-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add definition of hawk properties (sampling and subset)
- Loading branch information
1 parent
377be1f
commit 46d13e5
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
hawk/src/main/java/io/irw/hawk/configuration/HawkProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.irw.hawk.configuration; | ||
|
||
import io.irw.hawk.dto.merchandise.ProductVariantEnum; | ||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
@ConfigurationProperties(prefix = "hawk") | ||
@Data | ||
public class HawkProperties { | ||
|
||
private boolean ai; | ||
|
||
private Sampling sampling; | ||
|
||
private Subset subset; | ||
|
||
@Data | ||
public static class Sampling { | ||
private boolean enabled; | ||
private double rate; | ||
|
||
} | ||
|
||
@Data | ||
public static class Subset { | ||
private boolean enabled; | ||
private Products products; | ||
} | ||
|
||
@Data | ||
public static class Products { | ||
private List<ProductVariantEnum> variants; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters