diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/config/DistributionServiceConfig.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/config/DistributionServiceConfig.java index 73633b90d4..9c66ab2e42 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/config/DistributionServiceConfig.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/config/DistributionServiceConfig.java @@ -24,1110 +24,948 @@ @Validated public class DistributionServiceConfig { - private static final String PATH_REGEX = "^[/]?[a-zA-Z0-9_]{1,1024}(/[a-zA-Z0-9_]{1,1024}){0,256}[/]?$"; - private static final String RESOURCE_REGEX = "^(classpath:|file:[/]{1,3})?([a-zA-Z0-9_/\\.]{1,1010})$"; - private static final String RESOURCE_OR_EMPTY_REGEX = "(" + RESOURCE_REGEX + ")?"; - private static final String FILE_NAME_REGEX = "^[a-zA-Z0-9_-]{1,1024}$"; - private static final String FILE_NAME_WITH_TYPE_REGEX = "^[a-zA-Z0-9_-]{1,1024}\\.[a-z]{1,64}$"; - private static final String CHAR_AND_NUMBER_REGEX = "^[a-zA-Z0-9_-]{1,1024}$"; - private static final String CHAR_NUMBER_AND_SPACE_REGEX = "^[a-zA-Z0-9_\\s]{1,32}$"; - private static final String NO_WHITESPACE_REGEX = "^[\\S]+$"; - private static final String URL_REGEX = "^http[s]?://[a-zA-Z0-9-_]{1,1024}([\\./][a-zA-Z0-9-_]{1,1024}){0,256}[/]?$"; - private static final String NUMBER_REGEX = "^[0-9]{1,256}$"; - private static final String VERSION_REGEX = "^v[0-9]{1,256}$"; - private static final String ALGORITHM_OID_REGEX = "^[0-9]{1,256}[\\.[0-9]{1,256}]{0,256}$"; - private static final String BUNDLE_REGEX = "^[a-z-]{1,256}[\\.[a-z-]{1,256}]{0,256}$"; - private static final String PRIVATE_KEY_REGEX = - "^(classpath:|file:\\.?[/]{1,8})[a-zA-Z0-9_-]{1,256}:?[/[a-zA-Z0-9_-]{1,256}]{0,256}(.pem)?$"; - - private Paths paths; - private TestData testData; - @Min(0) - @Max(28) - private Integer retentionDays; - @Min(0) - @Max(4000) - private int srsTypeStatisticsDays; - @Min(120) - @Max(720) - private Integer expiryPolicyMinutes; - @Min(0) - @Max(200) - private Integer shiftingPolicyThreshold; - @Min(600000) - @Max(750000) - private Integer maximumNumberOfKeysPerBundle; - @Pattern(regexp = FILE_NAME_REGEX) - private String outputFileName; - @Pattern(regexp = FILE_NAME_REGEX) - private String outputFileNameV2; - private Boolean includeIncompleteDays; - private Boolean includeIncompleteHours; - private String euPackageName; - private Boolean applyPoliciesForAllCountries; - private String cardIdSequence; - private TekExport tekExport; - private Signature signature; - private Api api; - private ObjectStore objectStore; - private List appFeatures; - @NotEmpty - private String[] supportedCountries; - private AppVersions appVersions; - private AppConfigParameters appConfigParameters; - private StatisticsConfig statistics; - private QrCodePosterTemplate iosQrCodePosterTemplate; - private QrCodePosterTemplate androidQrCodePosterTemplate; - private PresenceTracingParameters presenceTracingParameters; - private DigitalGreenCertificate digitalGreenCertificate; - private Integer connectionPoolSize; - private String defaultArchiveName; - private Integer minimumTrlValueAllowed; - private Integer daysToPublish; - private DccRevocation dccRevocation; - @Min(0) - @Max(100) - private int infectionThreshold; - - public Paths getPaths() { - return paths; - } - - public void setPaths(Paths paths) { - this.paths = paths; - } - - public TestData getTestData() { - return testData; - } - - public void setTestData(TestData testData) { - this.testData = testData; - } - - public Integer getRetentionDays() { - return retentionDays; - } - - public void setRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - } - - public int getSrsTypeStatisticsDays() { - return srsTypeStatisticsDays; - } - - public void setSrsTypeStatisticsDays(final int srsTypeStatisticsDays) { - this.srsTypeStatisticsDays = srsTypeStatisticsDays; - } - - public Integer getDaysToPublish() { - return daysToPublish == null ? retentionDays : daysToPublish; - } - - public void setDaysToPublish(Integer daysToPublish) { - this.daysToPublish = daysToPublish; - } - - public Integer getExpiryPolicyMinutes() { - return expiryPolicyMinutes; - } - - public void setExpiryPolicyMinutes(Integer expiryPolicyMinutes) { - this.expiryPolicyMinutes = expiryPolicyMinutes; - } - - public Integer getShiftingPolicyThreshold() { - return shiftingPolicyThreshold; - } - - public void setShiftingPolicyThreshold(Integer shiftingPolicyThreshold) { - this.shiftingPolicyThreshold = shiftingPolicyThreshold; - } - - public Integer getMaximumNumberOfKeysPerBundle() { - return this.maximumNumberOfKeysPerBundle; - } - - public void setMaximumNumberOfKeysPerBundle(Integer maximumNumberOfKeysPerBundle) { - this.maximumNumberOfKeysPerBundle = maximumNumberOfKeysPerBundle; - } - - public String getOutputFileName() { - return outputFileName; - } - - public void setOutputFileName(String outputFileName) { - this.outputFileName = outputFileName; - } - - public String getOutputFileNameV2() { - return outputFileNameV2; - } - - public void setOutputFileNameV2(String outputFileNameV2) { - this.outputFileNameV2 = outputFileNameV2; - } - - public Boolean getIncludeIncompleteDays() { - return includeIncompleteDays; - } - - public void setIncludeIncompleteDays(Boolean includeIncompleteDays) { - this.includeIncompleteDays = includeIncompleteDays; - } - - public Boolean getIncludeIncompleteHours() { - return includeIncompleteHours; - } - - public void setIncludeIncompleteHours(Boolean includeIncompleteHours) { - this.includeIncompleteHours = includeIncompleteHours; - } - - public String getEuPackageName() { - return euPackageName; - } - - public void setEuPackageName(String euPackageName) { - this.euPackageName = euPackageName; - } - - public Boolean getApplyPoliciesForAllCountries() { - return applyPoliciesForAllCountries; - } - - public void setApplyPoliciesForAllCountries(Boolean applyPoliciesForAllCountries) { - this.applyPoliciesForAllCountries = applyPoliciesForAllCountries; - } - - public String getCardIdSequence() { - return cardIdSequence; - } - - public void setCardIdSequence(String cardIdSequence) { - this.cardIdSequence = cardIdSequence; - } - - public TekExport getTekExport() { - return tekExport; - } - - public void setTekExport(TekExport tekExport) { - this.tekExport = tekExport; - } - - public Signature getSignature() { - return signature; - } - - public void setSignature(Signature signature) { - this.signature = signature; - } + public static class AllowList { - public Api getApi() { - return api; - } + @JsonInclude(Include.NON_NULL) + @JsonIgnoreProperties(ignoreUnknown = true) + public static class CertificateAllowList { - public void setApi(Api api) { - this.api = api; - } + private String serviceProvider; + private String hostname; + private String fingerprint256; - public ObjectStore getObjectStore() { - return objectStore; - } + @JsonProperty("serviceProviderAllowlistEndpoint") + private String serviceProviderAllowlistEndpoint; - public void setObjectStore( - ObjectStore objectStore) { - this.objectStore = objectStore; - } + public String getFingerprint256() { + return fingerprint256; + } - public QrCodePosterTemplate getIosQrCodePosterTemplate() { - return iosQrCodePosterTemplate; - } + public String getHostname() { + return hostname; + } - public void setIosQrCodePosterTemplate(QrCodePosterTemplate iosQrCodePosterTemplate) { - this.iosQrCodePosterTemplate = iosQrCodePosterTemplate; - } + public String getServiceProvider() { + return serviceProvider; + } - public QrCodePosterTemplate getAndroidQrCodePosterTemplate() { - return androidQrCodePosterTemplate; - } + public String getServiceProviderAllowlistEndpoint() { + return serviceProviderAllowlistEndpoint; + } - public void setAndroidQrCodePosterTemplate(QrCodePosterTemplate androidQrCodePosterTemplate) { - this.androidQrCodePosterTemplate = androidQrCodePosterTemplate; - } + @JsonProperty("fingerprint256") + public void setFingerprint256(final String fingerprint256) { + this.fingerprint256 = fingerprint256; + } - public List getAppFeatures() { - return appFeatures; - } + @JsonProperty("hostname") + public void setHostname(final String hostname) { + this.hostname = hostname; + } - public void setAppFeatures(List appFeatures) { - this.appFeatures = appFeatures; - } + @JsonProperty("serviceProvider") + public void setServiceProvider(final String serviceProvider) { + this.serviceProvider = serviceProvider; + } - public String[] getSupportedCountries() { - return supportedCountries; - } + public void setServiceProviderAllowlistEndpoint(final String serviceProviderAllowlistEndpoint) { + this.serviceProviderAllowlistEndpoint = serviceProviderAllowlistEndpoint; + } + } - public void setSupportedCountries(String[] supportedCountries) { - this.supportedCountries = supportedCountries; - } + @JsonInclude(Include.NON_NULL) + @JsonIgnoreProperties(ignoreUnknown = true) + public static class ServiceProvider { - public AppVersions getAppVersions() { - return appVersions; - } + @JsonProperty("serviceProviderAllowlistEndpoint") + private String serviceProviderAllowlistEndpoint; + @JsonProperty("fingerprint256") + private String fingerprint256; - public void setAppVersions(AppVersions appVersions) { - this.appVersions = appVersions; - } + public String getFingerprint256() { + return fingerprint256; + } - public AppConfigParameters getAppConfigParameters() { - return appConfigParameters; - } + public String getServiceProviderAllowlistEndpoint() { + return serviceProviderAllowlistEndpoint; + } - public void setAppConfigParameters(AppConfigParameters appConfigParameters) { - this.appConfigParameters = appConfigParameters; - } + public void setFingerprint256(final String fingerprint256) { + this.fingerprint256 = fingerprint256; + } - public StatisticsConfig getStatistics() { - return statistics; - } + public void setServiceProviderAllowlistEndpoint(final String serviceProviderAllowlistEndpoint) { + this.serviceProviderAllowlistEndpoint = serviceProviderAllowlistEndpoint; + } + } - public void setStatistics(StatisticsConfig statistics) { - this.statistics = statistics; - } + private List certificates; - public Integer getMinimumTrlValueAllowed() { - return minimumTrlValueAllowed; - } + private List serviceProviders; - public void setMinimumTrlValueAllowed(Integer minimumTrlValueAllowed) { - this.minimumTrlValueAllowed = minimumTrlValueAllowed; - } + public List getCertificates() { + return certificates; + } - /** - * Get app features as list of protobuf objects. - * - * @return list of {@link app.coronawarn.server.common.protocols.internal.AppFeature} - */ - public List getAppFeaturesProto() { - return getAppFeatures().stream() - .map(appFeature -> app.coronawarn.server.common.protocols.internal.AppFeature.newBuilder() - .setLabel(appFeature.getLabel()) - .setValue(appFeature.getValue()).build()) - .collect(Collectors.toList()); - } + public List getServiceProviders() { + return serviceProviders; + } - public DccRevocation getDccRevocation() { - return this.dccRevocation; - } + @JsonProperty("certificates") + public void setCertificates(final List certificates) { + this.certificates = certificates; + } - public void setDccRevocation(DccRevocation dccRevocation) { - this.dccRevocation = dccRevocation; + @JsonProperty("serviceProviders") + public void setServiceProviders(final List serviceProviders) { + this.serviceProviders = serviceProviders; + } } - public int getInfectionThreshold() { - return infectionThreshold; - } + public static class Api { - public void setInfectionThreshold(int infectionThreshold) { - this.infectionThreshold = infectionThreshold; - } + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String versionPath; + @Pattern(regexp = VERSION_REGEX) + private String versionV1; + @Pattern(regexp = VERSION_REGEX) + private String versionV2; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String countryPath; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String originCountry; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String datePath; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String hourPath; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String diagnosisKeysPath; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String parametersPath; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String appConfigFileName; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String appConfigV2IosFileName; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String appConfigV2AndroidFileName; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String statisticsFileName; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String localStatisticsFileName; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String traceWarningsPath; - public static class StatisticsConfig { + public String getAppConfigFileName() { + return appConfigFileName; + } - private String statisticPath; + public String getAppConfigV2AndroidFileName() { + return appConfigV2AndroidFileName; + } - private String localStatisticPath; + public String getAppConfigV2IosFileName() { + return appConfigV2IosFileName; + } - private String accessKey; + public String getCountryPath() { + return countryPath; + } - private String secretKey; + public String getDatePath() { + return datePath; + } - private String endpoint; + public String getDiagnosisKeysPath() { + return diagnosisKeysPath; + } - private String bucket; + public String getHourPath() { + return hourPath; + } - private String pandemicRadarUrl; + public String getLocalStatisticsFileName() { + return localStatisticsFileName; + } - public String getPandemicRadarUrl() { - return pandemicRadarUrl; + public String getOriginCountry() { + return originCountry; } - public void setPandemicRadarUrl(String pandemicRadarUrl) { - this.pandemicRadarUrl = pandemicRadarUrl; + public String getParametersPath() { + return parametersPath; } - public String getLocalStatisticPath() { - return localStatisticPath; + public String getStatisticsFileName() { + return statisticsFileName; } - public void setLocalStatisticPath(String localStatisticPath) { - this.localStatisticPath = localStatisticPath; + public String getTraceWarningsPath() { + return traceWarningsPath; } - public String getStatisticPath() { - return statisticPath; + public String getVersionPath() { + return versionPath; } - public void setStatisticPath(String statisticPath) { - this.statisticPath = statisticPath; + public String getVersionV1() { + return versionV1; } - public String getAccessKey() { - return accessKey; + public String getVersionV2() { + return versionV2; } - public void setAccessKey(String accessKey) { - this.accessKey = accessKey; + public void setAppConfigFileName(final String appConfigFileName) { + this.appConfigFileName = appConfigFileName; } - public String getSecretKey() { - return secretKey; + public void setAppConfigV2AndroidFileName(final String appConfigV2AndroidFileName) { + this.appConfigV2AndroidFileName = appConfigV2AndroidFileName; } - public void setSecretKey(String secretKey) { - this.secretKey = secretKey; + public void setAppConfigV2IosFileName(final String appConfigV2IosFileName) { + this.appConfigV2IosFileName = appConfigV2IosFileName; } - public String getEndpoint() { - return endpoint; + public void setCountryPath(final String countryPath) { + this.countryPath = countryPath; } - public void setEndpoint(String endpoint) { - this.endpoint = endpoint; + public void setDatePath(final String datePath) { + this.datePath = datePath; } - public String getBucket() { - return bucket; + public void setDiagnosisKeysPath(final String diagnosisKeysPath) { + this.diagnosisKeysPath = diagnosisKeysPath; } - public void setBucket(String bucket) { - this.bucket = bucket; + public void setHourPath(final String hourPath) { + this.hourPath = hourPath; } - } - public static class TekExport { + public void setLocalStatisticsFileName(final String localStatisticsFileName) { + this.localStatisticsFileName = localStatisticsFileName; + } - @Pattern(regexp = FILE_NAME_WITH_TYPE_REGEX) - private String fileName; - @Pattern(regexp = CHAR_NUMBER_AND_SPACE_REGEX) - private String fileHeader; - @Min(0) - @Max(32) - private Integer fileHeaderWidth; + public void setOriginCountry(final String originCountry) { + this.originCountry = originCountry; + } - public String getFileName() { - return fileName; + public void setParametersPath(final String parametersPath) { + this.parametersPath = parametersPath; } - public void setFileName(String fileName) { - this.fileName = fileName; + public void setStatisticsFileName(final String statisticsFileName) { + this.statisticsFileName = statisticsFileName; } - public String getFileHeader() { - return fileHeader; + public void setTraceWarningsPath(final String traceWarningsPath) { + this.traceWarningsPath = traceWarningsPath; } - public void setFileHeader(String fileHeader) { - this.fileHeader = fileHeader; + public void setVersionPath(final String versionPath) { + this.versionPath = versionPath; } - public Integer getFileHeaderWidth() { - return fileHeaderWidth; + public void setVersionV1(final String versionV1) { + this.versionV1 = versionV1; } - public void setFileHeaderWidth(Integer fileHeaderWidth) { - this.fileHeaderWidth = fileHeaderWidth; + public void setVersionV2(final String versionV2) { + this.versionV2 = versionV2; } } - public static class TestData { + public static class AppConfigParameters { - private Integer seed; - private Integer exposuresPerHour; - private boolean distributionTestdataConsentToFederation; + public static class AndroidEventDrivenUserSurveyParameters extends CommonEdusParameters { - public Integer getSeed() { - return seed; - } + @NotNull + private Boolean requireBasicIntegrity; + @NotNull + private Boolean requireCtsProfileMatch; + @NotNull + private Boolean requireEvaluationTypeBasic; + @NotNull + private Boolean requireEvaluationTypeHardwareBacked; - public void setSeed(Integer seed) { - this.seed = seed; - } + public Boolean getRequireBasicIntegrity() { + return requireBasicIntegrity; + } - public Integer getExposuresPerHour() { - return exposuresPerHour; - } + public Boolean getRequireCtsProfileMatch() { + return requireCtsProfileMatch; + } - public void setExposuresPerHour(Integer exposuresPerHour) { - this.exposuresPerHour = exposuresPerHour; - } + public Boolean getRequireEvaluationTypeBasic() { + return requireEvaluationTypeBasic; + } - public boolean getDistributionTestdataConsentToFederation() { - return distributionTestdataConsentToFederation; - } + public Boolean getRequireEvaluationTypeHardwareBacked() { + return requireEvaluationTypeHardwareBacked; + } - public void setDistributionTestdataConsentToFederation(boolean distributionTestdataConsentToFederation) { - this.distributionTestdataConsentToFederation = distributionTestdataConsentToFederation; - } - } + public void setRequireBasicIntegrity(final Boolean requireBasicIntegrity) { + this.requireBasicIntegrity = requireBasicIntegrity; + } - public static class Paths { + public void setRequireCtsProfileMatch(final Boolean requireCtsProfileMatch) { + this.requireCtsProfileMatch = requireCtsProfileMatch; + } - @Pattern(regexp = PRIVATE_KEY_REGEX) - private String privateKey; - @Pattern(regexp = PATH_REGEX) - private String output; + public void setRequireEvaluationTypeBasic(final Boolean requireEvaluationTypeBasic) { + this.requireEvaluationTypeBasic = requireEvaluationTypeBasic; + } - public String getPrivateKey() { - return privateKey; + public void setRequireEvaluationTypeHardwareBacked(final Boolean requireEvaluationTypeHardwareBacked) { + this.requireEvaluationTypeHardwareBacked = requireEvaluationTypeHardwareBacked; + } } - public void setPrivateKey(String privateKey) { - this.privateKey = privateKey; - } + public static class AndroidExposureDetectionParameters { + private static final int LOWER_BOUNDARY_OVERALL_TIMEOUT = 0; - public String getOutput() { - return output; + public static final String MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = + "Android Exposure Detection: overall timeout in seconds must be greater than or equal to " + + LOWER_BOUNDARY_OVERALL_TIMEOUT; + private static final int UPPER_BOUNDARY_OVERALL_TIMEOUT = 3600; + public static final String MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = + "Android Exposure Detection: overall timeout in seconds must be lower than or equal to " + + UPPER_BOUNDARY_OVERALL_TIMEOUT; + private static final int LOWER_BOUNDARY_MAX_EXPOSURE_DETECTIONS = 0; + public static final String MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = + "Android Exposure Detection: max exposure detections per interval must be greater than or equal to " + + LOWER_BOUNDARY_MAX_EXPOSURE_DETECTIONS; + private static final int UPPER_BOUNDARY_MAX_EXPOSURE_DETECTIONS = 6; + public static final String MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = + "Android Exposure Detection: max exposure detections per interval must be lower than or equal to " + + UPPER_BOUNDARY_MAX_EXPOSURE_DETECTIONS; + @Min(value = LOWER_BOUNDARY_MAX_EXPOSURE_DETECTIONS, message = MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) + @Max(value = UPPER_BOUNDARY_MAX_EXPOSURE_DETECTIONS, message = MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) + private Integer maxExposureDetectionsPerInterval; + @Min(value = LOWER_BOUNDARY_OVERALL_TIMEOUT, message = MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) + @Max(value = UPPER_BOUNDARY_OVERALL_TIMEOUT, message = MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) + private Integer overallTimeoutInSeconds; + + public Integer getMaxExposureDetectionsPerInterval() { + return maxExposureDetectionsPerInterval; + } + + public Integer getOverallTimeoutInSeconds() { + return overallTimeoutInSeconds; + } + + public void setMaxExposureDetectionsPerInterval(final Integer maxExposureDetectionsPerInterval) { + this.maxExposureDetectionsPerInterval = maxExposureDetectionsPerInterval; + } + + public void setOverallTimeoutInSeconds(final Integer overallTimeoutInSeconds) { + this.overallTimeoutInSeconds = overallTimeoutInSeconds; + } } - public void setOutput(String output) { - this.output = output; + public static class AndroidKeyDownloadParameters extends CommonKeyDownloadParameters { + + private static final int LOWER_BOUNDARY_DOWNLOAD_TIMEOUT = 0; + public static final String MIN_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT = + "Download timeout in seconds must be greater than or equal to " + LOWER_BOUNDARY_DOWNLOAD_TIMEOUT; + private static final int UPPER_BOUNDARY_DOWNLOAD_TIMEOUT = 1800; + public static final String MAX_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT = + "Download timeout in seconds must be lower than or equal to " + UPPER_BOUNDARY_DOWNLOAD_TIMEOUT; + private static final int LOWER_BOUNDARY_OVERALL_TIMEOUT = 0; + public static final String MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = + "Android Key Download: overall timeout in seconds must be greater than or equal to " + + LOWER_BOUNDARY_OVERALL_TIMEOUT; + private static final int UPPER_BOUNDARY_OVERALL_TIMEOUT = 1800; + public static final String MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = + "Android Key Download: overall timeout in seconds must be lower than or equal to " + + UPPER_BOUNDARY_OVERALL_TIMEOUT; + + @Min(value = LOWER_BOUNDARY_DOWNLOAD_TIMEOUT, message = MIN_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT) + @Max(value = UPPER_BOUNDARY_DOWNLOAD_TIMEOUT, message = MAX_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT) + private Integer downloadTimeoutInSeconds; + @Min(value = LOWER_BOUNDARY_OVERALL_TIMEOUT, message = MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) + @Max(value = UPPER_BOUNDARY_OVERALL_TIMEOUT, message = MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) + private Integer overallTimeoutInSeconds; + + public Integer getDownloadTimeoutInSeconds() { + return downloadTimeoutInSeconds; + } + + public Integer getOverallTimeoutInSeconds() { + return overallTimeoutInSeconds; + } + + public void setDownloadTimeoutInSeconds(final Integer downloadTimeoutInSeconds) { + this.downloadTimeoutInSeconds = downloadTimeoutInSeconds; + } + + public void setOverallTimeoutInSeconds(final Integer overallTimeoutInSeconds) { + this.overallTimeoutInSeconds = overallTimeoutInSeconds; + } } - } - public static class Api { + public static class AndroidPrivacyPreservingAnalyticsParameters extends CommonPpaParameters { - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String versionPath; - @Pattern(regexp = VERSION_REGEX) - private String versionV1; - @Pattern(regexp = VERSION_REGEX) - private String versionV2; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String countryPath; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String originCountry; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String datePath; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String hourPath; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String diagnosisKeysPath; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String parametersPath; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String appConfigFileName; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String appConfigV2IosFileName; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String appConfigV2AndroidFileName; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String statisticsFileName; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String localStatisticsFileName; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String traceWarningsPath; + @NotNull + private Boolean requireBasicIntegrity; + @NotNull + private Boolean requireCtsProfileMatch; + @NotNull + private Boolean requireEvaluationTypeBasic; + @NotNull + private Boolean requireEvaluationTypeHardwareBacked; + + public Boolean getRequireBasicIntegrity() { + return requireBasicIntegrity; + } + + public Boolean getRequireCtsProfileMatch() { + return requireCtsProfileMatch; + } + + public Boolean getRequireEvaluationTypeBasic() { + return requireEvaluationTypeBasic; + } + + public Boolean getRequireEvaluationTypeHardwareBacked() { + return requireEvaluationTypeHardwareBacked; + } + + public void setRequireBasicIntegrity(final Boolean requireBasicIntegrity) { + this.requireBasicIntegrity = requireBasicIntegrity; + } - public String getStatisticsFileName() { - return statisticsFileName; - } + public void setRequireCtsProfileMatch(final Boolean requireCtsProfileMatch) { + this.requireCtsProfileMatch = requireCtsProfileMatch; + } - public void setStatisticsFileName(String statisticsFileName) { - this.statisticsFileName = statisticsFileName; - } + public void setRequireEvaluationTypeBasic(final Boolean requireEvaluationTypeBasic) { + this.requireEvaluationTypeBasic = requireEvaluationTypeBasic; + } - public String getLocalStatisticsFileName() { - return localStatisticsFileName; + public void setRequireEvaluationTypeHardwareBacked(final Boolean requireEvaluationTypeHardwareBacked) { + this.requireEvaluationTypeHardwareBacked = requireEvaluationTypeHardwareBacked; + } } - public void setLocalStatisticsFileName(String localStatisticsFileName) { - this.localStatisticsFileName = localStatisticsFileName; + public static class AndroidSrsPpacParameters extends AndroidPrivacyPreservingAnalyticsParameters { } - public String getAppConfigV2IosFileName() { - return appConfigV2IosFileName; - } + private static class CommonEdusParameters { - public void setAppConfigV2IosFileName(String appConfigV2IosFileName) { - this.appConfigV2IosFileName = appConfigV2IosFileName; - } + @Size(min = 1, max = 30) + private String otpQueryParameterName; + @NotNull + private Boolean surveyOnHighRiskEnabled; + @Pattern(regexp = URL_REGEX) + private String surveyOnHighRiskUrl; - public String getAppConfigV2AndroidFileName() { - return appConfigV2AndroidFileName; - } + public String getOtpQueryParameterName() { + return otpQueryParameterName; + } - public void setAppConfigV2AndroidFileName(String appConfigV2AndroidFileName) { - this.appConfigV2AndroidFileName = appConfigV2AndroidFileName; - } + public Boolean getSurveyOnHighRiskEnabled() { + return surveyOnHighRiskEnabled; + } - public String getVersionPath() { - return versionPath; - } + public String getSurveyOnHighRiskUrl() { + return surveyOnHighRiskUrl; + } - public void setVersionPath(String versionPath) { - this.versionPath = versionPath; - } + public void setOtpQueryParameterName(final String otpQueryParameterName) { + this.otpQueryParameterName = otpQueryParameterName; + } - public String getVersionV1() { - return versionV1; - } + public void setSurveyOnHighRiskEnabled(final Boolean surveyOnHighRiskEnabled) { + this.surveyOnHighRiskEnabled = surveyOnHighRiskEnabled; + } - public void setVersionV1(String versionV1) { - this.versionV1 = versionV1; + public void setSurveyOnHighRiskUrl(final String surveyOnHighRiskUrl) { + this.surveyOnHighRiskUrl = surveyOnHighRiskUrl; + } } - public String getVersionV2() { - return versionV2; - } + private abstract static class CommonKeyDownloadParameters { - public void setVersionV2(String versionV2) { - this.versionV2 = versionV2; - } + private String revokedDayPackages; + private String revokedHourPackages; - public String getCountryPath() { - return countryPath; - } + public List getRevokedDayPackages() { + return SerializationUtils.deserializeJson(revokedDayPackages, + typeFactory -> typeFactory.constructCollectionType(List.class, DeserializedDayPackageMetadata.class)); + } - public void setCountryPath(String countryPath) { - this.countryPath = countryPath; - } + public List getRevokedHourPackages() { + return SerializationUtils.deserializeJson(revokedHourPackages, + typeFactory -> typeFactory + .constructCollectionType(List.class, DeserializedHourPackageMetadata.class)); + } - public String getDatePath() { - return datePath; - } + public void setRevokedDayPackages(final String revokedDayPackages) { + this.revokedDayPackages = revokedDayPackages; + } - public void setDatePath(String datePath) { - this.datePath = datePath; + public void setRevokedHourPackages(final String revokedHourPackages) { + this.revokedHourPackages = revokedHourPackages; + } } - public String getHourPath() { - return hourPath; - } + private static class CommonPpaParameters { - public void setHourPath(String hourPath) { - this.hourPath = hourPath; - } + private Double probabilityToSubmit; + private Double probabilityToSubmitExposureWindows; + @PositiveOrZero + private Integer hoursSinceTestRegistrationToSubmitTestResultMetadata; + @PositiveOrZero + private Integer hoursSinceTestToSubmitKeySubmissionMetadata; - public String getDiagnosisKeysPath() { - return diagnosisKeysPath; - } + public Integer getHoursSinceTestRegistrationToSubmitTestResultMetadata() { + return hoursSinceTestRegistrationToSubmitTestResultMetadata; + } - public void setDiagnosisKeysPath(String diagnosisKeysPath) { - this.diagnosisKeysPath = diagnosisKeysPath; - } + public Integer getHoursSinceTestToSubmitKeySubmissionMetadata() { + return hoursSinceTestToSubmitKeySubmissionMetadata; + } - public String getParametersPath() { - return parametersPath; - } + public Double getProbabilityToSubmit() { + return probabilityToSubmit; + } - public void setParametersPath(String parametersPath) { - this.parametersPath = parametersPath; - } + public Double getProbabilityToSubmitExposureWindows() { + return probabilityToSubmitExposureWindows; + } - public String getAppConfigFileName() { - return appConfigFileName; - } + public void setHoursSinceTestRegistrationToSubmitTestResultMetadata(final Integer integer) { + this.hoursSinceTestRegistrationToSubmitTestResultMetadata = integer; + } - public void setAppConfigFileName(String appConfigFileName) { - this.appConfigFileName = appConfigFileName; - } + public void setHoursSinceTestToSubmitKeySubmissionMetadata( + final Integer hoursSinceTestToSubmitKeySubmissionMetadata) { + this.hoursSinceTestToSubmitKeySubmissionMetadata = hoursSinceTestToSubmitKeySubmissionMetadata; + } - public String getOriginCountry() { - return originCountry; - } + public void setProbabilityToSubmit(final Double probabilityToSubmit) { + this.probabilityToSubmit = probabilityToSubmit; + } - public void setOriginCountry(String originCountry) { - this.originCountry = originCountry; + public void setProbabilityToSubmitExposureWindows(final Double probabilityToSubmitExposureWindows) { + this.probabilityToSubmitExposureWindows = probabilityToSubmitExposureWindows; + } } - public String getTraceWarningsPath() { - return this.traceWarningsPath; - } + public static class DeserializedDayPackageMetadata { - public void setTraceWarningsPath(String traceWarningsPath) { - this.traceWarningsPath = traceWarningsPath; - } - } + private String region; + private String date; + private String etag; - public static class Signature { + public String getDate() { + return date; + } - @Pattern(regexp = BUNDLE_REGEX) - private String appBundleId; - private String androidPackage; - @Pattern(regexp = NUMBER_REGEX) - private String verificationKeyId; - @Pattern(regexp = VERSION_REGEX) - private String verificationKeyVersion; - @Pattern(regexp = ALGORITHM_OID_REGEX) - private String algorithmOid; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String algorithmName; - @Pattern(regexp = FILE_NAME_WITH_TYPE_REGEX) - private String fileName; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String securityProvider; + public String getEtag() { + return etag; + } - public String getAppBundleId() { - return appBundleId; + public String getRegion() { + return region; + } } - public void setAppBundleId(String appBundleId) { - this.appBundleId = appBundleId; - } + public static class DeserializedHourPackageMetadata extends DeserializedDayPackageMetadata { - public String getAndroidPackage() { - return androidPackage; - } + private Integer hour; - public void setAndroidPackage(String androidPackage) { - this.androidPackage = androidPackage; + public Integer getHour() { + return hour; + } } - public String getVerificationKeyId() { - return verificationKeyId; - } + public static class DgcParameters { - public void setVerificationKeyId(String verificationKeyId) { - this.verificationKeyId = verificationKeyId; - } + public static class DgcBlocklistParameters { - public String getVerificationKeyVersion() { - return verificationKeyVersion; - } + public static class DgcBlockedUvciChunk { - public void setVerificationKeyVersion(String verificationKeyVersion) { - this.verificationKeyVersion = verificationKeyVersion; - } + List indices; + String hash; + Integer validFrom; - public String getAlgorithmOid() { - return algorithmOid; - } + public byte[] getHash() { + return Hex.decode(hash); + } - public void setAlgorithmOid(String algorithmOid) { - this.algorithmOid = algorithmOid; - } + public List getIndices() { + return indices; + } - public String getAlgorithmName() { - return algorithmName; - } + public Integer getValidFrom() { + return validFrom; + } - public void setAlgorithmName(String algorithmName) { - this.algorithmName = algorithmName; - } + public void setHash(final String hash) { + this.hash = hash; + } - public String getFileName() { - return fileName; - } + public void setIndices(final List indices) { + this.indices = indices; + } - public void setFileName(String fileName) { - this.fileName = fileName; - } + public void setValidFrom(final Integer validFrom) { + this.validFrom = validFrom; + } + } - public String getSecurityProvider() { - return securityProvider; - } + private String blockedUvciChunks; + + /** + * Parse String from application.yaml parameter. + * + * @return parsed string in a list of DgcBlockedUvciChunk. + */ + public List getBlockedUvciChunks() { + return SerializationUtils.deserializeJson(blockedUvciChunks, + typeFactory -> typeFactory + .constructCollectionType(List.class, DgcBlockedUvciChunk.class)); + } + + public void setBlockedUvciChunks(final String blockedUvciChunks) { + this.blockedUvciChunks = blockedUvciChunks; + } + } + + public static class DgcTestCertificateParameters { + + @Min(0) + @Max(60) + private Integer waitAfterPublicKeyRegistrationInSeconds; + + @Min(0) + @Max(60) + private Integer waitForRetryInSeconds; - public void setSecurityProvider(String securityProvider) { - this.securityProvider = securityProvider; - } + public Integer getWaitAfterPublicKeyRegistrationInSeconds() { + return waitAfterPublicKeyRegistrationInSeconds; + } - /** - * Returns the static {@link SignatureInfo} configured in the application properties. - * - * @return SignatureInfo - */ - public SignatureInfo getSignatureInfo() { - return SignatureInfo.newBuilder() - .setAppBundleId(this.getAppBundleId()) - .setVerificationKeyVersion(this.getVerificationKeyVersion()) - .setVerificationKeyId(this.getVerificationKeyId()) - .setSignatureAlgorithm(this.getAlgorithmOid()) - .build(); - } - } + public Integer getWaitForRetryInSeconds() { + return waitForRetryInSeconds; + } - public static class QrCodePosterTemplate { + public void setWaitAfterPublicKeyRegistrationInSeconds(final Integer waitAfterPublicKeyRegistrationInSeconds) { + this.waitAfterPublicKeyRegistrationInSeconds = waitAfterPublicKeyRegistrationInSeconds; + } - private String template; - @NotNull - private Double offsetX; - @NotNull - private Double offsetY; - @NotNull - private Integer qrCodeSideLength; - @NotEmpty - private String publishedArchiveName; - private DescriptionTextBox descriptionTextBox; - private DescriptionTextBox addressTextBox; + public void setWaitForRetryInSeconds(final Integer waitForRetryInSeconds) { + this.waitForRetryInSeconds = waitForRetryInSeconds; + } + } + private DgcTestCertificateParameters dgcTestCertificateParameters; - public static class DescriptionTextBox { + @Min(0) + @Max(100) + private Integer expirationThresholdInDays; - @NotNull - private Double offsetX; - @NotNull - private Double offsetY; - @NotNull - private Integer width; - @NotNull - private Integer height; - @NotNull - private Integer fontSize; - @NotNull - private String fontColor; + private DgcBlocklistParameters blockListParameters; - public Double getOffsetX() { - return offsetX; - } + private String iosDgcReissueServicePublicKeyDigest; - public void setOffsetX(Double offsetX) { - this.offsetX = offsetX; - } + private String androidDgcReissueServicePublicKeyDigest; - public Double getOffsetY() { - return offsetY; + public byte[] getAndroidDgcReissueServicePublicKeyDigest() { + return Hex.decode(androidDgcReissueServicePublicKeyDigest); } - public void setOffsetY(Double offsetY) { - this.offsetY = offsetY; + public DgcBlocklistParameters getBlockListParameters() { + return blockListParameters; } - public Integer getWidth() { - return width; + public Integer getExpirationThresholdInDays() { + return expirationThresholdInDays; } - public void setWidth(Integer width) { - this.width = width; + public byte[] getIosDgcReissueServicePublicKeyDigest() { + return Hex.decode(iosDgcReissueServicePublicKeyDigest); } - public Integer getHeight() { - return height; + public DgcTestCertificateParameters getTestCertificateParameters() { + return dgcTestCertificateParameters; } - public void setHeight(Integer height) { - this.height = height; + public void setAndroidDgcReissueServicePublicKeyDigest(final String androidDgcReissueServicePublicKeyDigest) { + this.androidDgcReissueServicePublicKeyDigest = androidDgcReissueServicePublicKeyDigest; } - public Integer getFontSize() { - return fontSize; + public void setBlockListParameters(final DgcBlocklistParameters blockListParameters) { + this.blockListParameters = blockListParameters; } - public void setFontSize(Integer fontSize) { - this.fontSize = fontSize; + public void setExpirationThresholdInDays(final Integer expirationThresholdInDays) { + this.expirationThresholdInDays = expirationThresholdInDays; } - public String getFontColor() { - return fontColor; + public void setIosDgcReissueServicePublicKeyDigest(final String iosDgcReissueServicePublicKeyDigest) { + this.iosDgcReissueServicePublicKeyDigest = iosDgcReissueServicePublicKeyDigest; } - public void setFontColor(String fontColor) { - this.fontColor = fontColor; + public void setTestCertificateParameters(final DgcTestCertificateParameters dgcTestCertificateParameters) { + this.dgcTestCertificateParameters = dgcTestCertificateParameters; } } - public String getPublishedArchiveName() { - return publishedArchiveName; - } + public static class IosEventDrivenUserSurveyParameters extends CommonEdusParameters { - public void setPublishedArchiveName(String publishedArchiveName) { - this.publishedArchiveName = publishedArchiveName; } - public String getTemplate() { - return template; - } + public static class IosExposureDetectionParameters { - public void setTemplate(String template) { - this.template = template; - } + private static final int MIN_VALUE_MAX_EXPOSURE_DETECTIONS = 0; + public static final String MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = + "IOS Exposure Detection: max exposure detections per interval must be greater than or equal to " + + MIN_VALUE_MAX_EXPOSURE_DETECTIONS; + private static final int MAX_VALUE_MAX_EXPOSURE_DETECTIONS = 6; + public static final String MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = + "IOS Exposure Detection: max exposure detections per interval must be lower than or equal to " + + MAX_VALUE_MAX_EXPOSURE_DETECTIONS; - public Double getOffsetX() { - return offsetX; - } + @Min(value = MIN_VALUE_MAX_EXPOSURE_DETECTIONS, message = MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) + @Max(value = MAX_VALUE_MAX_EXPOSURE_DETECTIONS, message = MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) + private Integer maxExposureDetectionsPerInterval; - public void setOffsetX(Double offsetX) { - this.offsetX = offsetX; - } + public Integer getMaxExposureDetectionsPerInterval() { + return maxExposureDetectionsPerInterval; + } - public Double getOffsetY() { - return offsetY; - } + public void setMaxExposureDetectionsPerInterval(final Integer maxExposureDetectionsPerInterval) { + this.maxExposureDetectionsPerInterval = maxExposureDetectionsPerInterval; + } - public void setOffsetY(Double offsetY) { - this.offsetY = offsetY; } - public Integer getQrCodeSideLength() { - return qrCodeSideLength; - } + public static class IosKeyDownloadParameters extends CommonKeyDownloadParameters { - public void setQrCodeSideLength(Integer qrCodeSideLength) { - this.qrCodeSideLength = qrCodeSideLength; } - public DescriptionTextBox getDescriptionTextBox() { - return descriptionTextBox; - } + public static class IosPrivacyPreservingAnalyticsParameters extends CommonPpaParameters { - public void setDescriptionTextBox(DescriptionTextBox descriptionTextBox) { - this.descriptionTextBox = descriptionTextBox; } - public DescriptionTextBox getAddressTextBox() { - return addressTextBox; - } + private IosKeyDownloadParameters iosKeyDownloadParameters; - public void setAddressTextBox(DescriptionTextBox addressTextBox) { - this.addressTextBox = addressTextBox; - } - } + private AndroidKeyDownloadParameters androidKeyDownloadParameters; - public static class PresenceTracingParameters { + private IosExposureDetectionParameters iosExposureDetectionParameters; - private int qrCodeErrorCorrectionLevel; - private PlausibleDeniabilityParameters plausibleDeniabilityParameters; + private AndroidExposureDetectionParameters androidExposureDetectionParameters; - public static class PlausibleDeniabilityParameters { + private IosEventDrivenUserSurveyParameters iosEventDrivenUserSurveyParameters; - private double probabilityToFakeCheckInsIfNoCheckIns; - private double probabilityToFakeCheckInsIfSomeCheckIns; + private AndroidEventDrivenUserSurveyParameters androidEventDrivenUserSurveyParameters; - public double getProbabilityToFakeCheckInsIfNoCheckIns() { - return probabilityToFakeCheckInsIfNoCheckIns; - } + private IosPrivacyPreservingAnalyticsParameters iosPrivacyPreservingAnalyticsParameters; - public void setProbabilityToFakeCheckInsIfNoCheckIns(double probabilityToFakeCheckInsIfNoCheckIns) { - this.probabilityToFakeCheckInsIfNoCheckIns = probabilityToFakeCheckInsIfNoCheckIns; - } + private AndroidPrivacyPreservingAnalyticsParameters androidPrivacyPreservingAnalyticsParameters; - public double getProbabilityToFakeCheckInsIfSomeCheckIns() { - return probabilityToFakeCheckInsIfSomeCheckIns; - } + private AndroidSrsPpacParameters androidSrsPpacParameters; - public void setProbabilityToFakeCheckInsIfSomeCheckIns(double probabilityToFakeCheckInsIfSomeCheckIns) { - this.probabilityToFakeCheckInsIfSomeCheckIns = probabilityToFakeCheckInsIfSomeCheckIns; - } - } + private DgcParameters dgcParameters; - public PlausibleDeniabilityParameters getPlausibleDeniabilityParameters() { - return plausibleDeniabilityParameters; - } + @Min(1) + @Max(1000) + private int srsTimeSinceOnboardingInHours; - public void setPlausibleDeniabilityParameters(PlausibleDeniabilityParameters plausibleDeniabilityParameters) { - this.plausibleDeniabilityParameters = plausibleDeniabilityParameters; - } + @Min(1) + @Max(1000) + private int srsTimeBetweenSubmissionsInDays; - public int getQrCodeErrorCorrectionLevel() { - return qrCodeErrorCorrectionLevel; + public AndroidEventDrivenUserSurveyParameters getAndroidEventDrivenUserSurveyParameters() { + return androidEventDrivenUserSurveyParameters; } - public void setQrCodeErrorCorrectionLevel(int qrCodeErrorCorrectionLevel) { - this.qrCodeErrorCorrectionLevel = qrCodeErrorCorrectionLevel; + public AndroidExposureDetectionParameters getAndroidExposureDetectionParameters() { + return androidExposureDetectionParameters; } - } - - public PresenceTracingParameters getPresenceTracingParameters() { - return presenceTracingParameters; - } - - public void setPresenceTracingParameters( - PresenceTracingParameters presenceTracingParameters) { - this.presenceTracingParameters = presenceTracingParameters; - } - - public DigitalGreenCertificate getDigitalGreenCertificate() { - return digitalGreenCertificate; - } - - public void setDigitalGreenCertificate(DigitalGreenCertificate digitalGreenCertificate) { - this.digitalGreenCertificate = digitalGreenCertificate; - } - - public Integer getConnectionPoolSize() { - return connectionPoolSize; - } - - public void setConnectionPoolSize(Integer connectionPoolSize) { - this.connectionPoolSize = connectionPoolSize; - } - - public String getDefaultArchiveName() { - return defaultArchiveName; - } - public void setDefaultArchiveName(String defaultArchiveName) { - this.defaultArchiveName = defaultArchiveName; - } + public AndroidKeyDownloadParameters getAndroidKeyDownloadParameters() { + return androidKeyDownloadParameters; + } - public static class ObjectStore { + public AndroidPrivacyPreservingAnalyticsParameters getAndroidPrivacyPreservingAnalyticsParameters() { + return androidPrivacyPreservingAnalyticsParameters; + } - @Pattern(regexp = NO_WHITESPACE_REGEX) - private String accessKey; - @Pattern(regexp = NO_WHITESPACE_REGEX) - private String secretKey; - @Pattern(regexp = URL_REGEX) - private String endpoint; - @Min(1) - @Max(65535) - private Integer port; - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String bucket; - private Boolean setPublicReadAclOnPutObject; - @Min(1) - @Max(64) - private Integer maxNumberOfFailedOperations; - @Min(1) - @Max(64) - private Integer maxNumberOfS3Threads; - private Boolean forceUpdateKeyfiles; - @Max(Integer.MAX_VALUE) - private Integer hourFileRetentionDays; + public AndroidSrsPpacParameters getAndroidSrsPpacParameters() { + return androidSrsPpacParameters; + } - public String getAccessKey() { - return accessKey; + public DgcParameters getDgcParameters() { + return dgcParameters; } - public void setAccessKey(String accessKey) { - this.accessKey = accessKey; + public IosEventDrivenUserSurveyParameters getIosEventDrivenUserSurveyParameters() { + return iosEventDrivenUserSurveyParameters; } - public String getSecretKey() { - return secretKey; + public IosExposureDetectionParameters getIosExposureDetectionParameters() { + return iosExposureDetectionParameters; } - public void setSecretKey(String secretKey) { - this.secretKey = secretKey; + public IosKeyDownloadParameters getIosKeyDownloadParameters() { + return iosKeyDownloadParameters; } - public String getEndpoint() { - return endpoint; + public IosPrivacyPreservingAnalyticsParameters getIosPrivacyPreservingAnalyticsParameters() { + return iosPrivacyPreservingAnalyticsParameters; } - public void setEndpoint(String endpoint) { - this.endpoint = endpoint; + public int getSrsTimeBetweenSubmissionsInDays() { + return srsTimeBetweenSubmissionsInDays; } - public Integer getPort() { - return port; + public int getSrsTimeSinceOnboardingInHours() { + return srsTimeSinceOnboardingInHours; } - public void setPort(Integer port) { - this.port = port; + public void setAndroidEventDrivenUserSurveyParameters( + final AndroidEventDrivenUserSurveyParameters androidEventDrivenUserSurveyParameters) { + this.androidEventDrivenUserSurveyParameters = androidEventDrivenUserSurveyParameters; } - public String getBucket() { - return bucket; + public void setAndroidExposureDetectionParameters( + final AndroidExposureDetectionParameters androidExposureDetectionParameters) { + this.androidExposureDetectionParameters = androidExposureDetectionParameters; } - public void setBucket(String bucket) { - this.bucket = bucket; + public void setAndroidKeyDownloadParameters(final AndroidKeyDownloadParameters androidKeyDownloadParameters) { + this.androidKeyDownloadParameters = androidKeyDownloadParameters; } - public Boolean isSetPublicReadAclOnPutObject() { - return setPublicReadAclOnPutObject; + public void setAndroidPrivacyPreservingAnalyticsParameters( + final AndroidPrivacyPreservingAnalyticsParameters androidPrivacyPreservingAnalyticsParameters) { + this.androidPrivacyPreservingAnalyticsParameters = androidPrivacyPreservingAnalyticsParameters; } - public void setSetPublicReadAclOnPutObject(Boolean setPublicReadAclOnPutObject) { - this.setPublicReadAclOnPutObject = setPublicReadAclOnPutObject; + public void setAndroidSrsPpacParameters(final AndroidSrsPpacParameters androidSrsPpacParameters) { + this.androidSrsPpacParameters = androidSrsPpacParameters; } - public Integer getMaxNumberOfFailedOperations() { - return maxNumberOfFailedOperations; + public void setDgcParameters(final DgcParameters dgcParameters) { + this.dgcParameters = dgcParameters; } - public void setMaxNumberOfFailedOperations(Integer maxNumberOfFailedOperations) { - this.maxNumberOfFailedOperations = maxNumberOfFailedOperations; + public void setIosEventDrivenUserSurveyParameters( + final IosEventDrivenUserSurveyParameters iosEventDrivenUserSurveyParameters) { + this.iosEventDrivenUserSurveyParameters = iosEventDrivenUserSurveyParameters; } - public Integer getMaxNumberOfS3Threads() { - return maxNumberOfS3Threads; + public void setIosExposureDetectionParameters(final IosExposureDetectionParameters iosExposureDetectionParameters) { + this.iosExposureDetectionParameters = iosExposureDetectionParameters; } - public void setMaxNumberOfS3Threads(Integer maxNumberOfS3Threads) { - this.maxNumberOfS3Threads = maxNumberOfS3Threads; + public void setIosKeyDownloadParameters(final IosKeyDownloadParameters iosKeyDownloadParameters) { + this.iosKeyDownloadParameters = iosKeyDownloadParameters; } - public Boolean getForceUpdateKeyfiles() { - return forceUpdateKeyfiles; + public void setIosPrivacyPreservingAnalyticsParameters( + final IosPrivacyPreservingAnalyticsParameters iosPrivacyPreservingAnalyticsParameters) { + this.iosPrivacyPreservingAnalyticsParameters = iosPrivacyPreservingAnalyticsParameters; } - public void setForceUpdateKeyfiles(Boolean forceUpdateKeyfiles) { - this.forceUpdateKeyfiles = forceUpdateKeyfiles; + public void setSrsTimeBetweenSubmissionsInDays(final int srsTimeBetweenSubmissionsInDays) { + this.srsTimeBetweenSubmissionsInDays = srsTimeBetweenSubmissionsInDays; } - public Integer getHourFileRetentionDays() { - return hourFileRetentionDays; + public void setSrsTimeSinceOnboardingInHours(final int srsTimeSinceOnboardingInHours) { + this.srsTimeSinceOnboardingInHours = srsTimeSinceOnboardingInHours; } - public void setHourFileRetentionDays(Integer hourFileRetentionDays) { - this.hourFileRetentionDays = hourFileRetentionDays; - } } - public static class Client { + public static class AppFeature { - private String publicKey; + private String label; + private Integer value; - private String baseUrl; + public String getLabel() { + return label; + } - private Ssl ssl; + public Integer getValue() { + return value; + } - private int retryPeriod; + public void setLabel(final String label) { + this.label = label; + } - private int maxRetryPeriod; + public void setValue(final Integer value) { + this.value = value; + } + } - private int maxRetryAttempts; + public static class AppVersions { - public String getPublicKey() { - return publicKey; + private String latestIos; + private String minIos; + private String latestAndroid; + private String minAndroid; + @PositiveOrZero + private Integer latestAndroidVersionCode; + @PositiveOrZero + private Integer minAndroidVersionCode; + + public String getLatestAndroid() { + return latestAndroid; } - public void setPublicKey(String publicKey) { - this.publicKey = publicKey; + public Integer getLatestAndroidVersionCode() { + return latestAndroidVersionCode; } - public Ssl getSsl() { - return ssl; + public String getLatestIos() { + return latestIos; } - public void setSsl(Ssl ssl) { - this.ssl = ssl; + public String getMinAndroid() { + return minAndroid; } - public String getBaseUrl() { - return baseUrl; + public Integer getMinAndroidVersionCode() { + return minAndroidVersionCode; } - public void setBaseUrl(String baseUrl) { - this.baseUrl = baseUrl; + public String getMinIos() { + return minIos; } - public int getRetryPeriod() { - return retryPeriod; + public void setLatestAndroid(final String latestAndroid) { + this.latestAndroid = latestAndroid; } - public void setRetryPeriod(int retryPeriod) { - this.retryPeriod = retryPeriod; + public void setLatestAndroidVersionCode(final Integer latestAndroidVersionCode) { + this.latestAndroidVersionCode = latestAndroidVersionCode; } - public int getMaxRetryPeriod() { - return maxRetryPeriod; + public void setLatestIos(final String latestIos) { + this.latestIos = latestIos; } - public void setMaxRetryPeriod(int maxRetryPeriod) { - this.maxRetryPeriod = maxRetryPeriod; + public void setMinAndroid(final String minAndroid) { + this.minAndroid = minAndroid; } - public int getMaxRetryAttempts() { - return maxRetryAttempts; + public void setMinAndroidVersionCode(final Integer minAndroidVersionCode) { + this.minAndroidVersionCode = minAndroidVersionCode; } - public void setMaxRetryAttempts(int maxRetryAttempts) { - this.maxRetryAttempts = maxRetryAttempts; + public void setMinIos(final String minIos) { + this.minIos = minIos; } + } + + public static class Client { public static class Ssl { @@ -1138,1053 +976,1249 @@ public File getTrustStore() { return trustStore; } - public void setTrustStore(File trustStore) { - this.trustStore = trustStore; - } - public String getTrustStorePassword() { return trustStorePassword; } - public void setTrustStorePassword(String trustStorePassword) { + public void setTrustStore(final File trustStore) { + this.trustStore = trustStore; + } + + public void setTrustStorePassword(final String trustStorePassword) { this.trustStorePassword = trustStorePassword; } } - } - public static class AppFeature { + private String publicKey; - private String label; - private Integer value; + private String baseUrl; - public String getLabel() { - return label; + private Ssl ssl; + + private int retryPeriod; + + private int maxRetryPeriod; + + private int maxRetryAttempts; + + public String getBaseUrl() { + return baseUrl; } - public void setLabel(String label) { - this.label = label; + public int getMaxRetryAttempts() { + return maxRetryAttempts; } - public Integer getValue() { - return value; + public int getMaxRetryPeriod() { + return maxRetryPeriod; } - public void setValue(Integer value) { - this.value = value; + public String getPublicKey() { + return publicKey; + } + + public int getRetryPeriod() { + return retryPeriod; + } + + public Ssl getSsl() { + return ssl; + } + + public void setBaseUrl(final String baseUrl) { + this.baseUrl = baseUrl; + } + + public void setMaxRetryAttempts(final int maxRetryAttempts) { + this.maxRetryAttempts = maxRetryAttempts; + } + + public void setMaxRetryPeriod(final int maxRetryPeriod) { + this.maxRetryPeriod = maxRetryPeriod; + } + + public void setPublicKey(final String publicKey) { + this.publicKey = publicKey; + } + + public void setRetryPeriod(final int retryPeriod) { + this.retryPeriod = retryPeriod; + } + + public void setSsl(final Ssl ssl) { + this.ssl = ssl; } } - public static class AppVersions { + public static class DccRevocation { - private String latestIos; - private String minIos; - private String latestAndroid; - private String minAndroid; - @PositiveOrZero - private Integer latestAndroidVersionCode; - @PositiveOrZero - private Integer minAndroidVersionCode; + private Client client; + private String certificate; + private String dccListPath; + private String dccRevocationDirectory; - public String getLatestIos() { - return latestIos; + public String getCertificate() { + return certificate; } - public void setLatestIos(String latestIos) { - this.latestIos = latestIos; + public Client getClient() { + return client; } - public String getMinIos() { - return minIos; + public String getDccListPath() { + return dccListPath; } - public void setMinIos(String minIos) { - this.minIos = minIos; + public String getDccRevocationDirectory() { + return dccRevocationDirectory; } - public String getLatestAndroid() { - return latestAndroid; + public void setCertificate(final String certificate) { + this.certificate = certificate; } - public void setLatestAndroid(String latestAndroid) { - this.latestAndroid = latestAndroid; + public void setClient(final Client client) { + this.client = client; } - public String getMinAndroid() { - return minAndroid; + public void setDccListPath(final String dccListPath) { + this.dccListPath = dccListPath; + } + + public void setDccRevocationDirectory(final String dccRevocationDirectory) { + this.dccRevocationDirectory = dccRevocationDirectory; } + } + + public static class DigitalGreenCertificate { + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String mahJsonPath; + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String prophylaxisJsonPath; + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String medicinalProductsJsonPath; + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String diseaseAgentTargetedJsonPath; + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String testManfJsonPath; + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String testResultJsonPath; + + @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) + private String testTypeJsonPath; + + @NotNull + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String dgcDirectory; + + @NotNull + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String boosterNotification; - public void setMinAndroid(String minAndroid) { - this.minAndroid = minAndroid; - } + @NotNull + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String valuesetsFileName; - public Integer getLatestAndroidVersionCode() { - return latestAndroidVersionCode; - } + private String cclDirectory; - public void setLatestAndroidVersionCode(Integer latestAndroidVersionCode) { - this.latestAndroidVersionCode = latestAndroidVersionCode; - } + private String[] cclAllowList; - public Integer getMinAndroidVersionCode() { - return minAndroidVersionCode; - } + private String allowList; - public void setMinAndroidVersionCode(Integer minAndroidVersionCode) { - this.minAndroidVersionCode = minAndroidVersionCode; - } - } + private String allowListSignature; - public static class AppConfigParameters { + private String allowListCertificate; - private IosKeyDownloadParameters iosKeyDownloadParameters; - private AndroidKeyDownloadParameters androidKeyDownloadParameters; - private IosExposureDetectionParameters iosExposureDetectionParameters; - private AndroidExposureDetectionParameters androidExposureDetectionParameters; - private IosEventDrivenUserSurveyParameters iosEventDrivenUserSurveyParameters; - private AndroidEventDrivenUserSurveyParameters androidEventDrivenUserSurveyParameters; - private IosPrivacyPreservingAnalyticsParameters iosPrivacyPreservingAnalyticsParameters; - private AndroidPrivacyPreservingAnalyticsParameters androidPrivacyPreservingAnalyticsParameters; - private AndroidSrsPpacParameters androidSrsPpacParameters; - private DgcParameters dgcParameters; + private String[] supportedLanguages; - @Min(1) - @Max(1000) - private int srsTimeSinceOnboardingInHours; - @Min(1) - @Max(1000) - private int srsTimeBetweenSubmissionsInDays; + private String exportArchiveName; - public IosEventDrivenUserSurveyParameters getIosEventDrivenUserSurveyParameters() { - return iosEventDrivenUserSurveyParameters; - } + private Client client; - public void setIosEventDrivenUserSurveyParameters( - IosEventDrivenUserSurveyParameters iosEventDrivenUserSurveyParameters) { - this.iosEventDrivenUserSurveyParameters = iosEventDrivenUserSurveyParameters; - } + private Client dscClient; - public AndroidEventDrivenUserSurveyParameters getAndroidEventDrivenUserSurveyParameters() { - return androidEventDrivenUserSurveyParameters; + /** + * getAllowList. + * + * @return AllowList + */ + public AllowList getAllowList() { + return SerializationUtils.deserializeJson(allowList, + typeFactory -> typeFactory + .constructType(AllowList.class)); } - public void setAndroidEventDrivenUserSurveyParameters( - AndroidEventDrivenUserSurveyParameters androidEventDrivenUserSurveyParameters) { - this.androidEventDrivenUserSurveyParameters = androidEventDrivenUserSurveyParameters; + public String getAllowListAsString() { + return allowList; } - public IosPrivacyPreservingAnalyticsParameters getIosPrivacyPreservingAnalyticsParameters() { - return iosPrivacyPreservingAnalyticsParameters; + public String getAllowListCertificate() { + return allowListCertificate; } - public void setIosPrivacyPreservingAnalyticsParameters( - IosPrivacyPreservingAnalyticsParameters iosPrivacyPreservingAnalyticsParameters) { - this.iosPrivacyPreservingAnalyticsParameters = iosPrivacyPreservingAnalyticsParameters; + public byte[] getAllowListSignature() { + return Hex.decode(allowListSignature); } - public AndroidPrivacyPreservingAnalyticsParameters getAndroidPrivacyPreservingAnalyticsParameters() { - return androidPrivacyPreservingAnalyticsParameters; + public String getBoosterNotification() { + return boosterNotification; } - public void setAndroidPrivacyPreservingAnalyticsParameters( - AndroidPrivacyPreservingAnalyticsParameters androidPrivacyPreservingAnalyticsParameters) { - this.androidPrivacyPreservingAnalyticsParameters = androidPrivacyPreservingAnalyticsParameters; + public String[] getCclAllowList() { + return cclAllowList; } - public IosKeyDownloadParameters getIosKeyDownloadParameters() { - return iosKeyDownloadParameters; + public String getCclDirectory() { + return cclDirectory; } - public void setIosKeyDownloadParameters(IosKeyDownloadParameters iosKeyDownloadParameters) { - this.iosKeyDownloadParameters = iosKeyDownloadParameters; + public Client getClient() { + return client; } - public AndroidKeyDownloadParameters getAndroidKeyDownloadParameters() { - return androidKeyDownloadParameters; + public String getDgcDirectory() { + return dgcDirectory; } - public void setAndroidKeyDownloadParameters(AndroidKeyDownloadParameters androidKeyDownloadParameters) { - this.androidKeyDownloadParameters = androidKeyDownloadParameters; + public String getDiseaseAgentTargetedJsonPath() { + return diseaseAgentTargetedJsonPath; } - public IosExposureDetectionParameters getIosExposureDetectionParameters() { - return iosExposureDetectionParameters; + public Client getDscClient() { + return dscClient; } - public void setIosExposureDetectionParameters(IosExposureDetectionParameters iosExposureDetectionParameters) { - this.iosExposureDetectionParameters = iosExposureDetectionParameters; + public String getExportArchiveName() { + return exportArchiveName; } - public AndroidExposureDetectionParameters getAndroidExposureDetectionParameters() { - return androidExposureDetectionParameters; + public String getMahJsonPath() { + return mahJsonPath; } - public void setAndroidExposureDetectionParameters( - AndroidExposureDetectionParameters androidExposureDetectionParameters) { - this.androidExposureDetectionParameters = androidExposureDetectionParameters; + public String getMedicinalProductsJsonPath() { + return medicinalProductsJsonPath; } - public DgcParameters getDgcParameters() { - return dgcParameters; + public String getProphylaxisJsonPath() { + return prophylaxisJsonPath; } - public void setDgcParameters(DgcParameters dgcParameters) { - this.dgcParameters = dgcParameters; + public String[] getSupportedLanguages() { + return supportedLanguages; } - public int getSrsTimeBetweenSubmissionsInDays() { - return srsTimeBetweenSubmissionsInDays; + public String getTestManfJsonPath() { + return testManfJsonPath; } - public int getSrsTimeSinceOnboardingInHours() { - return srsTimeSinceOnboardingInHours; + public String getTestResultJsonPath() { + return testResultJsonPath; } - public void setSrsTimeSinceOnboardingInHours(final int srsTimeSinceOnboardingInHours) { - this.srsTimeSinceOnboardingInHours = srsTimeSinceOnboardingInHours; + public String getTestTypeJsonPath() { + return testTypeJsonPath; } - public void setSrsTimeBetweenSubmissionsInDays(final int srsTimeBetweenSubmissionsInDays) { - this.srsTimeBetweenSubmissionsInDays = srsTimeBetweenSubmissionsInDays; + public String getValuesetsFileName() { + return valuesetsFileName; } - public AndroidSrsPpacParameters getAndroidSrsPpacParameters() { - return androidSrsPpacParameters; + public void setAllowList(final String allowList) { + this.allowList = allowList; } - public void setAndroidSrsPpacParameters(final AndroidSrsPpacParameters androidSrsPpacParameters) { - this.androidSrsPpacParameters = androidSrsPpacParameters; + public void setAllowListCertificate(final String allowListCertificate) { + this.allowListCertificate = allowListCertificate; } - public static class AndroidKeyDownloadParameters extends CommonKeyDownloadParameters { - - private static final int LOWER_BOUNDARY_DOWNLOAD_TIMEOUT = 0; - public static final String MIN_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT = - "Download timeout in seconds must be greater than or equal to " + LOWER_BOUNDARY_DOWNLOAD_TIMEOUT; - private static final int UPPER_BOUNDARY_DOWNLOAD_TIMEOUT = 1800; - public static final String MAX_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT = - "Download timeout in seconds must be lower than or equal to " + UPPER_BOUNDARY_DOWNLOAD_TIMEOUT; - private static final int LOWER_BOUNDARY_OVERALL_TIMEOUT = 0; - public static final String MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = - "Android Key Download: overall timeout in seconds must be greater than or equal to " - + LOWER_BOUNDARY_OVERALL_TIMEOUT; - private static final int UPPER_BOUNDARY_OVERALL_TIMEOUT = 1800; - public static final String MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = - "Android Key Download: overall timeout in seconds must be lower than or equal to " - + UPPER_BOUNDARY_OVERALL_TIMEOUT; - - @Min(value = LOWER_BOUNDARY_DOWNLOAD_TIMEOUT, message = MIN_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT) - @Max(value = UPPER_BOUNDARY_DOWNLOAD_TIMEOUT, message = MAX_VALUE_ERROR_MESSAGE_DOWNLOAD_TIMEOUT) - private Integer downloadTimeoutInSeconds; - @Min(value = LOWER_BOUNDARY_OVERALL_TIMEOUT, message = MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) - @Max(value = UPPER_BOUNDARY_OVERALL_TIMEOUT, message = MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) - private Integer overallTimeoutInSeconds; - - public Integer getDownloadTimeoutInSeconds() { - return downloadTimeoutInSeconds; - } - - public void setDownloadTimeoutInSeconds(Integer downloadTimeoutInSeconds) { - this.downloadTimeoutInSeconds = downloadTimeoutInSeconds; - } - - public Integer getOverallTimeoutInSeconds() { - return overallTimeoutInSeconds; - } - - public void setOverallTimeoutInSeconds(Integer overallTimeoutInSeconds) { - this.overallTimeoutInSeconds = overallTimeoutInSeconds; - } + public void setAllowListSignature(final String allowListSignature) { + this.allowListSignature = allowListSignature; } - public static class DeserializedDayPackageMetadata { - - private String region; - private String date; - private String etag; - - public String getRegion() { - return region; - } - - public String getDate() { - return date; - } - - public String getEtag() { - return etag; - } + public void setBoosterNotification(final String boosterNotification) { + this.boosterNotification = boosterNotification; } - public static class DeserializedHourPackageMetadata extends DeserializedDayPackageMetadata { - - private Integer hour; - - public Integer getHour() { - return hour; - } + public void setCclAllowList(final String[] cclAllowList) { + this.cclAllowList = cclAllowList; } - private abstract static class CommonKeyDownloadParameters { - - private String revokedDayPackages; - private String revokedHourPackages; - - public List getRevokedDayPackages() { - return SerializationUtils.deserializeJson(revokedDayPackages, - typeFactory -> typeFactory.constructCollectionType(List.class, DeserializedDayPackageMetadata.class)); - } - - public void setRevokedDayPackages(String revokedDayPackages) { - this.revokedDayPackages = revokedDayPackages; - } - - public List getRevokedHourPackages() { - return SerializationUtils.deserializeJson(revokedHourPackages, - typeFactory -> typeFactory - .constructCollectionType(List.class, DeserializedHourPackageMetadata.class)); - } - - public void setRevokedHourPackages(String revokedHourPackages) { - this.revokedHourPackages = revokedHourPackages; - } + public void setCclDirectory(final String cclDirectory) { + this.cclDirectory = cclDirectory; } - public static class IosKeyDownloadParameters extends CommonKeyDownloadParameters { - + public void setClient(final Client client) { + this.client = client; } - public static class IosExposureDetectionParameters { - - private static final int MIN_VALUE_MAX_EXPOSURE_DETECTIONS = 0; - public static final String MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = - "IOS Exposure Detection: max exposure detections per interval must be greater than or equal to " - + MIN_VALUE_MAX_EXPOSURE_DETECTIONS; - private static final int MAX_VALUE_MAX_EXPOSURE_DETECTIONS = 6; - public static final String MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = - "IOS Exposure Detection: max exposure detections per interval must be lower than or equal to " - + MAX_VALUE_MAX_EXPOSURE_DETECTIONS; - - @Min(value = MIN_VALUE_MAX_EXPOSURE_DETECTIONS, message = MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) - @Max(value = MAX_VALUE_MAX_EXPOSURE_DETECTIONS, message = MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) - private Integer maxExposureDetectionsPerInterval; - - public Integer getMaxExposureDetectionsPerInterval() { - return maxExposureDetectionsPerInterval; - } - - public void setMaxExposureDetectionsPerInterval(Integer maxExposureDetectionsPerInterval) { - this.maxExposureDetectionsPerInterval = maxExposureDetectionsPerInterval; - } - + public void setDgcDirectory(final String dgcDirectory) { + this.dgcDirectory = dgcDirectory; } - public static class AndroidExposureDetectionParameters { - - private static final int LOWER_BOUNDARY_OVERALL_TIMEOUT = 0; - public static final String MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = - "Android Exposure Detection: overall timeout in seconds must be greater than or equal to " - + LOWER_BOUNDARY_OVERALL_TIMEOUT; - private static final int UPPER_BOUNDARY_OVERALL_TIMEOUT = 3600; - public static final String MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT = - "Android Exposure Detection: overall timeout in seconds must be lower than or equal to " - + UPPER_BOUNDARY_OVERALL_TIMEOUT; - private static final int LOWER_BOUNDARY_MAX_EXPOSURE_DETECTIONS = 0; - public static final String MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = - "Android Exposure Detection: max exposure detections per interval must be greater than or equal to " - + LOWER_BOUNDARY_MAX_EXPOSURE_DETECTIONS; - private static final int UPPER_BOUNDARY_MAX_EXPOSURE_DETECTIONS = 6; - public static final String MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS = - "Android Exposure Detection: max exposure detections per interval must be lower than or equal to " - + UPPER_BOUNDARY_MAX_EXPOSURE_DETECTIONS; - @Min(value = LOWER_BOUNDARY_MAX_EXPOSURE_DETECTIONS, message = MIN_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) - @Max(value = UPPER_BOUNDARY_MAX_EXPOSURE_DETECTIONS, message = MAX_VALUE_ERROR_MESSAGE_MAX_EXPOSURE_DETECTIONS) - private Integer maxExposureDetectionsPerInterval; - @Min(value = LOWER_BOUNDARY_OVERALL_TIMEOUT, message = MIN_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) - @Max(value = UPPER_BOUNDARY_OVERALL_TIMEOUT, message = MAX_VALUE_ERROR_MESSAGE_OVERALL_TIMEOUT) - private Integer overallTimeoutInSeconds; + public void setDiseaseAgentTargetedJsonPath(final String diseaseAgentTargetedJsonPath) { + this.diseaseAgentTargetedJsonPath = diseaseAgentTargetedJsonPath; + } - public Integer getMaxExposureDetectionsPerInterval() { - return maxExposureDetectionsPerInterval; - } + public void setDscClient(final Client dscClient) { + this.dscClient = dscClient; + } - public void setMaxExposureDetectionsPerInterval(Integer maxExposureDetectionsPerInterval) { - this.maxExposureDetectionsPerInterval = maxExposureDetectionsPerInterval; - } + public void setExportArchiveName(final String exportArchiveName) { + this.exportArchiveName = exportArchiveName; + } - public Integer getOverallTimeoutInSeconds() { - return overallTimeoutInSeconds; - } + public void setMahJsonPath(final String mahJsonPath) { + this.mahJsonPath = mahJsonPath; + } - public void setOverallTimeoutInSeconds(Integer overallTimeoutInSeconds) { - this.overallTimeoutInSeconds = overallTimeoutInSeconds; - } + public void setMedicinalProductsJsonPath(final String medicinalProductsJsonPath) { + this.medicinalProductsJsonPath = medicinalProductsJsonPath; } - public static class IosEventDrivenUserSurveyParameters extends CommonEdusParameters { + public void setProphylaxisJsonPath(final String prophylaxisJsonPath) { + this.prophylaxisJsonPath = prophylaxisJsonPath; + } + public void setSupportedLanguages(final String[] supportedLanguages) { + this.supportedLanguages = supportedLanguages; } - private static class CommonEdusParameters { + public void setTestManfJsonPath(final String testManfJsonPath) { + this.testManfJsonPath = testManfJsonPath; + } - @Size(min = 1, max = 30) - private String otpQueryParameterName; - @NotNull - private Boolean surveyOnHighRiskEnabled; - @Pattern(regexp = URL_REGEX) - private String surveyOnHighRiskUrl; + public void setTestResultJsonPath(final String testResultJsonPath) { + this.testResultJsonPath = testResultJsonPath; + } - public String getOtpQueryParameterName() { - return otpQueryParameterName; - } + public void setTestTypeJsonPath(final String testTypeJsonPath) { + this.testTypeJsonPath = testTypeJsonPath; + } - public void setOtpQueryParameterName(String otpQueryParameterName) { - this.otpQueryParameterName = otpQueryParameterName; - } + public void setValuesetsFileName(final String valuesetsFileName) { + this.valuesetsFileName = valuesetsFileName; + } + } - public Boolean getSurveyOnHighRiskEnabled() { - return surveyOnHighRiskEnabled; - } + public static class ObjectStore { - public void setSurveyOnHighRiskEnabled(Boolean surveyOnHighRiskEnabled) { - this.surveyOnHighRiskEnabled = surveyOnHighRiskEnabled; - } + @Pattern(regexp = NO_WHITESPACE_REGEX) + private String accessKey; + @Pattern(regexp = NO_WHITESPACE_REGEX) + private String secretKey; + @Pattern(regexp = URL_REGEX) + private String endpoint; + @Min(1) + @Max(65535) + private Integer port; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String bucket; + private Boolean setPublicReadAclOnPutObject; + @Min(1) + @Max(64) + private Integer maxNumberOfFailedOperations; + @Min(1) + @Max(64) + private Integer maxNumberOfS3Threads; + private Boolean forceUpdateKeyfiles; + @Max(Integer.MAX_VALUE) + private Integer hourFileRetentionDays; - public String getSurveyOnHighRiskUrl() { - return surveyOnHighRiskUrl; - } + public String getAccessKey() { + return accessKey; + } - public void setSurveyOnHighRiskUrl(String surveyOnHighRiskUrl) { - this.surveyOnHighRiskUrl = surveyOnHighRiskUrl; - } + public String getBucket() { + return bucket; } - public static class AndroidEventDrivenUserSurveyParameters extends CommonEdusParameters { + public String getEndpoint() { + return endpoint; + } - @NotNull - private Boolean requireBasicIntegrity; - @NotNull - private Boolean requireCtsProfileMatch; - @NotNull - private Boolean requireEvaluationTypeBasic; - @NotNull - private Boolean requireEvaluationTypeHardwareBacked; + public Boolean getForceUpdateKeyfiles() { + return forceUpdateKeyfiles; + } - public Boolean getRequireBasicIntegrity() { - return requireBasicIntegrity; - } + public Integer getHourFileRetentionDays() { + return hourFileRetentionDays; + } - public void setRequireBasicIntegrity(Boolean requireBasicIntegrity) { - this.requireBasicIntegrity = requireBasicIntegrity; - } + public Integer getMaxNumberOfFailedOperations() { + return maxNumberOfFailedOperations; + } - public Boolean getRequireCtsProfileMatch() { - return requireCtsProfileMatch; - } + public Integer getMaxNumberOfS3Threads() { + return maxNumberOfS3Threads; + } - public void setRequireCtsProfileMatch(Boolean requireCtsProfileMatch) { - this.requireCtsProfileMatch = requireCtsProfileMatch; - } + public Integer getPort() { + return port; + } - public Boolean getRequireEvaluationTypeBasic() { - return requireEvaluationTypeBasic; - } + public String getSecretKey() { + return secretKey; + } - public void setRequireEvaluationTypeBasic(Boolean requireEvaluationTypeBasic) { - this.requireEvaluationTypeBasic = requireEvaluationTypeBasic; - } + public Boolean isSetPublicReadAclOnPutObject() { + return setPublicReadAclOnPutObject; + } - public Boolean getRequireEvaluationTypeHardwareBacked() { - return requireEvaluationTypeHardwareBacked; - } + public void setAccessKey(final String accessKey) { + this.accessKey = accessKey; + } - public void setRequireEvaluationTypeHardwareBacked(Boolean requireEvaluationTypeHardwareBacked) { - this.requireEvaluationTypeHardwareBacked = requireEvaluationTypeHardwareBacked; - } + public void setBucket(final String bucket) { + this.bucket = bucket; } - public static class IosPrivacyPreservingAnalyticsParameters extends CommonPpaParameters { + public void setEndpoint(final String endpoint) { + this.endpoint = endpoint; + } + public void setForceUpdateKeyfiles(final Boolean forceUpdateKeyfiles) { + this.forceUpdateKeyfiles = forceUpdateKeyfiles; } - private static class CommonPpaParameters { + public void setHourFileRetentionDays(final Integer hourFileRetentionDays) { + this.hourFileRetentionDays = hourFileRetentionDays; + } - private Double probabilityToSubmit; - private Double probabilityToSubmitExposureWindows; - @PositiveOrZero - private Integer hoursSinceTestRegistrationToSubmitTestResultMetadata; - @PositiveOrZero - private Integer hoursSinceTestToSubmitKeySubmissionMetadata; + public void setMaxNumberOfFailedOperations(final Integer maxNumberOfFailedOperations) { + this.maxNumberOfFailedOperations = maxNumberOfFailedOperations; + } - public Double getProbabilityToSubmit() { - return probabilityToSubmit; - } + public void setMaxNumberOfS3Threads(final Integer maxNumberOfS3Threads) { + this.maxNumberOfS3Threads = maxNumberOfS3Threads; + } - public void setProbabilityToSubmit(Double probabilityToSubmit) { - this.probabilityToSubmit = probabilityToSubmit; - } + public void setPort(final Integer port) { + this.port = port; + } - public Double getProbabilityToSubmitExposureWindows() { - return probabilityToSubmitExposureWindows; - } + public void setSecretKey(final String secretKey) { + this.secretKey = secretKey; + } - public void setProbabilityToSubmitExposureWindows(Double probabilityToSubmitExposureWindows) { - this.probabilityToSubmitExposureWindows = probabilityToSubmitExposureWindows; - } + public void setSetPublicReadAclOnPutObject(final Boolean setPublicReadAclOnPutObject) { + this.setPublicReadAclOnPutObject = setPublicReadAclOnPutObject; + } + } - public Integer getHoursSinceTestRegistrationToSubmitTestResultMetadata() { - return hoursSinceTestRegistrationToSubmitTestResultMetadata; - } + public static class Paths { - public void setHoursSinceTestRegistrationToSubmitTestResultMetadata( - Integer hoursSinceTestRegistrationToSubmitTestResultMetadata) { - this.hoursSinceTestRegistrationToSubmitTestResultMetadata = - hoursSinceTestRegistrationToSubmitTestResultMetadata; - } + @Pattern(regexp = PRIVATE_KEY_REGEX) + private String privateKey; + @Pattern(regexp = PATH_REGEX) + private String output; - public Integer getHoursSinceTestToSubmitKeySubmissionMetadata() { - return hoursSinceTestToSubmitKeySubmissionMetadata; - } + public String getOutput() { + return output; + } - public void setHoursSinceTestToSubmitKeySubmissionMetadata(Integer hoursSinceTestToSubmitKeySubmissionMetadata) { - this.hoursSinceTestToSubmitKeySubmissionMetadata = hoursSinceTestToSubmitKeySubmissionMetadata; - } + public String getPrivateKey() { + return privateKey; } - public static class AndroidPrivacyPreservingAnalyticsParameters extends CommonPpaParameters { + public void setOutput(final String output) { + this.output = output; + } - @NotNull - private Boolean requireBasicIntegrity; - @NotNull - private Boolean requireCtsProfileMatch; - @NotNull - private Boolean requireEvaluationTypeBasic; - @NotNull - private Boolean requireEvaluationTypeHardwareBacked; + public void setPrivateKey(final String privateKey) { + this.privateKey = privateKey; + } + } - public Boolean getRequireBasicIntegrity() { - return requireBasicIntegrity; - } + public static class PresenceTracingParameters { - public void setRequireBasicIntegrity(Boolean requireBasicIntegrity) { - this.requireBasicIntegrity = requireBasicIntegrity; - } + public static class PlausibleDeniabilityParameters { - public Boolean getRequireCtsProfileMatch() { - return requireCtsProfileMatch; - } + private double probabilityToFakeCheckInsIfNoCheckIns; + private double probabilityToFakeCheckInsIfSomeCheckIns; - public void setRequireCtsProfileMatch(Boolean requireCtsProfileMatch) { - this.requireCtsProfileMatch = requireCtsProfileMatch; + public double getProbabilityToFakeCheckInsIfNoCheckIns() { + return probabilityToFakeCheckInsIfNoCheckIns; } - public Boolean getRequireEvaluationTypeBasic() { - return requireEvaluationTypeBasic; + public double getProbabilityToFakeCheckInsIfSomeCheckIns() { + return probabilityToFakeCheckInsIfSomeCheckIns; } - public void setRequireEvaluationTypeBasic(Boolean requireEvaluationTypeBasic) { - this.requireEvaluationTypeBasic = requireEvaluationTypeBasic; + public void setProbabilityToFakeCheckInsIfNoCheckIns(final double probabilityToFakeCheckInsIfNoCheckIns) { + this.probabilityToFakeCheckInsIfNoCheckIns = probabilityToFakeCheckInsIfNoCheckIns; } - public Boolean getRequireEvaluationTypeHardwareBacked() { - return requireEvaluationTypeHardwareBacked; + public void setProbabilityToFakeCheckInsIfSomeCheckIns(final double probabilityToFakeCheckInsIfSomeCheckIns) { + this.probabilityToFakeCheckInsIfSomeCheckIns = probabilityToFakeCheckInsIfSomeCheckIns; } + } - public void setRequireEvaluationTypeHardwareBacked(Boolean requireEvaluationTypeHardwareBacked) { - this.requireEvaluationTypeHardwareBacked = requireEvaluationTypeHardwareBacked; - } + private int qrCodeErrorCorrectionLevel; + + private PlausibleDeniabilityParameters plausibleDeniabilityParameters; + + public PlausibleDeniabilityParameters getPlausibleDeniabilityParameters() { + return plausibleDeniabilityParameters; } - public static class AndroidSrsPpacParameters extends AndroidPrivacyPreservingAnalyticsParameters { + public int getQrCodeErrorCorrectionLevel() { + return qrCodeErrorCorrectionLevel; } - public static class DgcParameters { + public void setPlausibleDeniabilityParameters(final PlausibleDeniabilityParameters plausibleDeniabilityParameters) { + this.plausibleDeniabilityParameters = plausibleDeniabilityParameters; + } - private DgcTestCertificateParameters dgcTestCertificateParameters; + public void setQrCodeErrorCorrectionLevel(final int qrCodeErrorCorrectionLevel) { + this.qrCodeErrorCorrectionLevel = qrCodeErrorCorrectionLevel; + } + } - @Min(0) - @Max(100) - private Integer expirationThresholdInDays; + public static class QrCodePosterTemplate { - private DgcBlocklistParameters blockListParameters; + public static class DescriptionTextBox { + + @NotNull + private Double offsetX; + @NotNull + private Double offsetY; + @NotNull + private Integer width; + @NotNull + private Integer height; + @NotNull + private Integer fontSize; + @NotNull + private String fontColor; - private String iosDgcReissueServicePublicKeyDigest; + public String getFontColor() { + return fontColor; + } - private String androidDgcReissueServicePublicKeyDigest; + public Integer getFontSize() { + return fontSize; + } - public DgcTestCertificateParameters getTestCertificateParameters() { - return dgcTestCertificateParameters; + public Integer getHeight() { + return height; } - public void setTestCertificateParameters(DgcTestCertificateParameters dgcTestCertificateParameters) { - this.dgcTestCertificateParameters = dgcTestCertificateParameters; + public Double getOffsetX() { + return offsetX; } - public Integer getExpirationThresholdInDays() { - return expirationThresholdInDays; + public Double getOffsetY() { + return offsetY; } - public void setExpirationThresholdInDays(Integer expirationThresholdInDays) { - this.expirationThresholdInDays = expirationThresholdInDays; + public Integer getWidth() { + return width; } - public DgcBlocklistParameters getBlockListParameters() { - return blockListParameters; + public void setFontColor(final String fontColor) { + this.fontColor = fontColor; } - public void setBlockListParameters(DgcBlocklistParameters blockListParameters) { - this.blockListParameters = blockListParameters; + public void setFontSize(final Integer fontSize) { + this.fontSize = fontSize; } - public byte[] getIosDgcReissueServicePublicKeyDigest() { - return Hex.decode(iosDgcReissueServicePublicKeyDigest); + public void setHeight(final Integer height) { + this.height = height; } - public void setIosDgcReissueServicePublicKeyDigest(String iosDgcReissueServicePublicKeyDigest) { - this.iosDgcReissueServicePublicKeyDigest = iosDgcReissueServicePublicKeyDigest; + public void setOffsetX(final Double offsetX) { + this.offsetX = offsetX; } - public byte[] getAndroidDgcReissueServicePublicKeyDigest() { - return Hex.decode(androidDgcReissueServicePublicKeyDigest); + public void setOffsetY(final Double offsetY) { + this.offsetY = offsetY; } - public void setAndroidDgcReissueServicePublicKeyDigest(String androidDgcReissueServicePublicKeyDigest) { - this.androidDgcReissueServicePublicKeyDigest = androidDgcReissueServicePublicKeyDigest; + public void setWidth(final Integer width) { + this.width = width; } + } - public static class DgcTestCertificateParameters { + private String template; + @NotNull + private Double offsetX; + @NotNull + private Double offsetY; + @NotNull + private Integer qrCodeSideLength; + @NotEmpty + private String publishedArchiveName; + private DescriptionTextBox descriptionTextBox; - @Min(0) - @Max(60) - private Integer waitAfterPublicKeyRegistrationInSeconds; + private DescriptionTextBox addressTextBox; - @Min(0) - @Max(60) - private Integer waitForRetryInSeconds; + public DescriptionTextBox getAddressTextBox() { + return addressTextBox; + } - public Integer getWaitAfterPublicKeyRegistrationInSeconds() { - return waitAfterPublicKeyRegistrationInSeconds; - } + public DescriptionTextBox getDescriptionTextBox() { + return descriptionTextBox; + } - public void setWaitAfterPublicKeyRegistrationInSeconds(Integer waitAfterPublicKeyRegistrationInSeconds) { - this.waitAfterPublicKeyRegistrationInSeconds = waitAfterPublicKeyRegistrationInSeconds; - } + public Double getOffsetX() { + return offsetX; + } - public Integer getWaitForRetryInSeconds() { - return waitForRetryInSeconds; - } + public Double getOffsetY() { + return offsetY; + } - public void setWaitForRetryInSeconds(Integer waitForRetryInSeconds) { - this.waitForRetryInSeconds = waitForRetryInSeconds; - } - } + public String getPublishedArchiveName() { + return publishedArchiveName; + } - public static class DgcBlocklistParameters { + public Integer getQrCodeSideLength() { + return qrCodeSideLength; + } - private String blockedUvciChunks; + public String getTemplate() { + return template; + } - /** - * Parse String from application.yaml parameter. - * - * @return parsed string in a list of DgcBlockedUvciChunk. - */ - public List getBlockedUvciChunks() { - return SerializationUtils.deserializeJson(blockedUvciChunks, - typeFactory -> typeFactory - .constructCollectionType(List.class, DgcBlockedUvciChunk.class)); - } + public void setAddressTextBox(final DescriptionTextBox addressTextBox) { + this.addressTextBox = addressTextBox; + } - public void setBlockedUvciChunks(String blockedUvciChunks) { - this.blockedUvciChunks = blockedUvciChunks; - } + public void setDescriptionTextBox(final DescriptionTextBox descriptionTextBox) { + this.descriptionTextBox = descriptionTextBox; + } - public static class DgcBlockedUvciChunk { + public void setOffsetX(final Double offsetX) { + this.offsetX = offsetX; + } - List indices; - String hash; - Integer validFrom; + public void setOffsetY(final Double offsetY) { + this.offsetY = offsetY; + } - public List getIndices() { - return indices; - } + public void setPublishedArchiveName(final String publishedArchiveName) { + this.publishedArchiveName = publishedArchiveName; + } - public void setIndices(List indices) { - this.indices = indices; - } + public void setQrCodeSideLength(final Integer qrCodeSideLength) { + this.qrCodeSideLength = qrCodeSideLength; + } - public byte[] getHash() { - return Hex.decode(hash); - } + public void setTemplate(final String template) { + this.template = template; + } + } - public void setHash(String hash) { - this.hash = hash; - } + public static class Signature { - public Integer getValidFrom() { - return validFrom; - } + @Pattern(regexp = BUNDLE_REGEX) + private String appBundleId; + private String androidPackage; + @Pattern(regexp = NUMBER_REGEX) + private String verificationKeyId; + @Pattern(regexp = VERSION_REGEX) + private String verificationKeyVersion; + @Pattern(regexp = ALGORITHM_OID_REGEX) + private String algorithmOid; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String algorithmName; + @Pattern(regexp = FILE_NAME_WITH_TYPE_REGEX) + private String fileName; + @Pattern(regexp = CHAR_AND_NUMBER_REGEX) + private String securityProvider; - public void setValidFrom(Integer validFrom) { - this.validFrom = validFrom; - } - } - } + public String getAlgorithmName() { + return algorithmName; } + public String getAlgorithmOid() { + return algorithmOid; + } - } + public String getAndroidPackage() { + return androidPackage; + } - public static class DigitalGreenCertificate { + public String getAppBundleId() { + return appBundleId; + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String mahJsonPath; + public String getFileName() { + return fileName; + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String prophylaxisJsonPath; + public String getSecurityProvider() { + return securityProvider; + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String medicinalProductsJsonPath; + /** + * Returns the static {@link SignatureInfo} configured in the application properties. + * + * @return SignatureInfo + */ + public SignatureInfo getSignatureInfo() { + return SignatureInfo.newBuilder() + .setAppBundleId(getAppBundleId()) + .setVerificationKeyVersion(getVerificationKeyVersion()) + .setVerificationKeyId(getVerificationKeyId()) + .setSignatureAlgorithm(getAlgorithmOid()) + .build(); + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String diseaseAgentTargetedJsonPath; + public String getVerificationKeyId() { + return verificationKeyId; + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String testManfJsonPath; + public String getVerificationKeyVersion() { + return verificationKeyVersion; + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String testResultJsonPath; + public void setAlgorithmName(final String algorithmName) { + this.algorithmName = algorithmName; + } - @Pattern(regexp = RESOURCE_OR_EMPTY_REGEX) - private String testTypeJsonPath; + public void setAlgorithmOid(final String algorithmOid) { + this.algorithmOid = algorithmOid; + } - @NotNull - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String dgcDirectory; + public void setAndroidPackage(final String androidPackage) { + this.androidPackage = androidPackage; + } - @NotNull - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String boosterNotification; + public void setAppBundleId(final String appBundleId) { + this.appBundleId = appBundleId; + } - @NotNull - @Pattern(regexp = CHAR_AND_NUMBER_REGEX) - private String valuesetsFileName; + public void setFileName(final String fileName) { + this.fileName = fileName; + } - private String cclDirectory; + public void setSecurityProvider(final String securityProvider) { + this.securityProvider = securityProvider; + } - private String[] cclAllowList; + public void setVerificationKeyId(final String verificationKeyId) { + this.verificationKeyId = verificationKeyId; + } - private String allowList; + public void setVerificationKeyVersion(final String verificationKeyVersion) { + this.verificationKeyVersion = verificationKeyVersion; + } + } + + public static class StatisticsConfig { + + private String statisticPath; + + private String localStatisticPath; + + private String accessKey; + + private String secretKey; + + private String endpoint; + + private String bucket; + + private String pandemicRadarUrl; - private String allowListSignature; + private String pandemicRadarBmgUrl; - private String allowListCertificate; + public String getAccessKey() { + return accessKey; + } - private String[] supportedLanguages; + public String getBucket() { + return bucket; + } - private String exportArchiveName; + public String getEndpoint() { + return endpoint; + } - private Client client; + public String getLocalStatisticPath() { + return localStatisticPath; + } - private Client dscClient; + public String getPandemicRadarBmgUrl() { + return pandemicRadarBmgUrl; + } - public String getMahJsonPath() { - return mahJsonPath; + public String getPandemicRadarUrl() { + return pandemicRadarUrl; } - public void setMahJsonPath(String mahJsonPath) { - this.mahJsonPath = mahJsonPath; + public String getSecretKey() { + return secretKey; } - public String getProphylaxisJsonPath() { - return prophylaxisJsonPath; + public String getStatisticPath() { + return statisticPath; } - public void setProphylaxisJsonPath(String prophylaxisJsonPath) { - this.prophylaxisJsonPath = prophylaxisJsonPath; + public void setAccessKey(final String accessKey) { + this.accessKey = accessKey; } - public String getMedicinalProductsJsonPath() { - return medicinalProductsJsonPath; + public void setBucket(final String bucket) { + this.bucket = bucket; } - public void setMedicinalProductsJsonPath(String medicinalProductsJsonPath) { - this.medicinalProductsJsonPath = medicinalProductsJsonPath; + public void setEndpoint(final String endpoint) { + this.endpoint = endpoint; } - public String getDiseaseAgentTargetedJsonPath() { - return diseaseAgentTargetedJsonPath; + public void setLocalStatisticPath(final String localStatisticPath) { + this.localStatisticPath = localStatisticPath; } - public void setDiseaseAgentTargetedJsonPath(String diseaseAgentTargetedJsonPath) { - this.diseaseAgentTargetedJsonPath = diseaseAgentTargetedJsonPath; + public void setPandemicRadarBmgUrl(final String pandemicRadarBmgUrl) { + this.pandemicRadarBmgUrl = pandemicRadarBmgUrl; } - public String getTestManfJsonPath() { - return testManfJsonPath; + public void setPandemicRadarUrl(final String pandemicRadarUrl) { + this.pandemicRadarUrl = pandemicRadarUrl; } - public void setTestManfJsonPath(String testManfJsonPath) { - this.testManfJsonPath = testManfJsonPath; + public void setSecretKey(final String secretKey) { + this.secretKey = secretKey; } - public String getTestResultJsonPath() { - return testResultJsonPath; + public void setStatisticPath(final String statisticPath) { + this.statisticPath = statisticPath; } + } - public void setTestResultJsonPath(String testResultJsonPath) { - this.testResultJsonPath = testResultJsonPath; + public static class TekExport { + + @Pattern(regexp = FILE_NAME_WITH_TYPE_REGEX) + private String fileName; + @Pattern(regexp = CHAR_NUMBER_AND_SPACE_REGEX) + private String fileHeader; + @Min(0) + @Max(32) + private Integer fileHeaderWidth; + + public String getFileHeader() { + return fileHeader; } - public String getTestTypeJsonPath() { - return testTypeJsonPath; + public Integer getFileHeaderWidth() { + return fileHeaderWidth; } - public void setTestTypeJsonPath(String testTypeJsonPath) { - this.testTypeJsonPath = testTypeJsonPath; + public String getFileName() { + return fileName; } - public String getDgcDirectory() { - return dgcDirectory; + public void setFileHeader(final String fileHeader) { + this.fileHeader = fileHeader; } - public void setDgcDirectory(String dgcDirectory) { - this.dgcDirectory = dgcDirectory; + public void setFileHeaderWidth(final Integer fileHeaderWidth) { + this.fileHeaderWidth = fileHeaderWidth; } - public String getBoosterNotification() { - return boosterNotification; + public void setFileName(final String fileName) { + this.fileName = fileName; } + } - public void setBoosterNotification(String boosterNotification) { - this.boosterNotification = boosterNotification; + public static class TestData { + + private Integer seed; + private Integer exposuresPerHour; + private boolean distributionTestdataConsentToFederation; + + public boolean getDistributionTestdataConsentToFederation() { + return distributionTestdataConsentToFederation; } - public String getValuesetsFileName() { - return valuesetsFileName; + public Integer getExposuresPerHour() { + return exposuresPerHour; } - public void setValuesetsFileName(String valuesetsFileName) { - this.valuesetsFileName = valuesetsFileName; + public Integer getSeed() { + return seed; } - public String[] getSupportedLanguages() { - return supportedLanguages; + public void setDistributionTestdataConsentToFederation(final boolean distributionTestdataConsentToFederation) { + this.distributionTestdataConsentToFederation = distributionTestdataConsentToFederation; } - public void setSupportedLanguages(String[] supportedLanguages) { - this.supportedLanguages = supportedLanguages; + public void setExposuresPerHour(final Integer exposuresPerHour) { + this.exposuresPerHour = exposuresPerHour; } - public String getCclDirectory() { - return cclDirectory; + public void setSeed(final Integer seed) { + this.seed = seed; } + } + + private static final String PATH_REGEX = "^[/]?[a-zA-Z0-9_]{1,1024}(/[a-zA-Z0-9_]{1,1024}){0,256}[/]?$"; + private static final String RESOURCE_REGEX = "^(classpath:|file:[/]{1,3})?([a-zA-Z0-9_/\\.]{1,1010})$"; + private static final String RESOURCE_OR_EMPTY_REGEX = "(" + RESOURCE_REGEX + ")?"; + private static final String FILE_NAME_REGEX = "^[a-zA-Z0-9_-]{1,1024}$"; + private static final String FILE_NAME_WITH_TYPE_REGEX = "^[a-zA-Z0-9_-]{1,1024}\\.[a-z]{1,64}$"; + private static final String CHAR_AND_NUMBER_REGEX = "^[a-zA-Z0-9_-]{1,1024}$"; + private static final String CHAR_NUMBER_AND_SPACE_REGEX = "^[a-zA-Z0-9_\\s]{1,32}$"; + private static final String NO_WHITESPACE_REGEX = "^[\\S]+$"; + private static final String URL_REGEX = "^http[s]?://[a-zA-Z0-9-_]{1,1024}([\\./][a-zA-Z0-9-_]{1,1024}){0,256}[/]?$"; + private static final String NUMBER_REGEX = "^[0-9]{1,256}$"; + private static final String VERSION_REGEX = "^v[0-9]{1,256}$"; + private static final String ALGORITHM_OID_REGEX = "^[0-9]{1,256}[\\.[0-9]{1,256}]{0,256}$"; + private static final String BUNDLE_REGEX = "^[a-z-]{1,256}[\\.[a-z-]{1,256}]{0,256}$"; + private static final String PRIVATE_KEY_REGEX = + "^(classpath:|file:\\.?[/]{1,8})[a-zA-Z0-9_-]{1,256}:?[/[a-zA-Z0-9_-]{1,256}]{0,256}(.pem)?$"; + private Paths paths; + private TestData testData; + @Min(0) + @Max(28) + private Integer retentionDays; + @Min(0) + @Max(4000) + private int srsTypeStatisticsDays; + @Min(120) + @Max(720) + private Integer expiryPolicyMinutes; + @Min(0) + @Max(200) + private Integer shiftingPolicyThreshold; + @Min(600000) + @Max(750000) + private Integer maximumNumberOfKeysPerBundle; + @Pattern(regexp = FILE_NAME_REGEX) + private String outputFileName; + @Pattern(regexp = FILE_NAME_REGEX) + private String outputFileNameV2; + private Boolean includeIncompleteDays; + private Boolean includeIncompleteHours; + private String euPackageName; + private Boolean applyPoliciesForAllCountries; + private String cardIdSequence; + private TekExport tekExport; + private Signature signature; + private Api api; + + private ObjectStore objectStore; + + private List appFeatures; + + @NotEmpty + private String[] supportedCountries; + + private AppVersions appVersions; + + private AppConfigParameters appConfigParameters; + + private StatisticsConfig statistics; + + private QrCodePosterTemplate iosQrCodePosterTemplate; + + private QrCodePosterTemplate androidQrCodePosterTemplate; + + private PresenceTracingParameters presenceTracingParameters; + + private DigitalGreenCertificate digitalGreenCertificate; + + private Integer connectionPoolSize; + + private String defaultArchiveName; + + private Integer minimumTrlValueAllowed; + + private Integer daysToPublish; + + private DccRevocation dccRevocation; + + @Min(0) + @Max(100) + private int infectionThreshold; + + public QrCodePosterTemplate getAndroidQrCodePosterTemplate() { + return androidQrCodePosterTemplate; + } + + public Api getApi() { + return api; + } + + public AppConfigParameters getAppConfigParameters() { + return appConfigParameters; + } + + public List getAppFeatures() { + return appFeatures; + } + + /** + * Get app features as list of protobuf objects. + * + * @return list of {@link app.coronawarn.server.common.protocols.internal.AppFeature} + */ + public List getAppFeaturesProto() { + return getAppFeatures().stream() + .map(appFeature -> app.coronawarn.server.common.protocols.internal.AppFeature.newBuilder() + .setLabel(appFeature.getLabel()) + .setValue(appFeature.getValue()).build()) + .collect(Collectors.toList()); + } + + public Boolean getApplyPoliciesForAllCountries() { + return applyPoliciesForAllCountries; + } + + public AppVersions getAppVersions() { + return appVersions; + } + + public String getCardIdSequence() { + return cardIdSequence; + } + + public Integer getConnectionPoolSize() { + return connectionPoolSize; + } + + public Integer getDaysToPublish() { + return daysToPublish == null ? retentionDays : daysToPublish; + } + + public DccRevocation getDccRevocation() { + return dccRevocation; + } + + public String getDefaultArchiveName() { + return defaultArchiveName; + } + + public DigitalGreenCertificate getDigitalGreenCertificate() { + return digitalGreenCertificate; + } + + public String getEuPackageName() { + return euPackageName; + } + + public Integer getExpiryPolicyMinutes() { + return expiryPolicyMinutes; + } + + public Boolean getIncludeIncompleteDays() { + return includeIncompleteDays; + } + + public Boolean getIncludeIncompleteHours() { + return includeIncompleteHours; + } - public void setCclDirectory(String cclDirectory) { - this.cclDirectory = cclDirectory; - } + public int getInfectionThreshold() { + return infectionThreshold; + } - public String[] getCclAllowList() { - return cclAllowList; - } + public QrCodePosterTemplate getIosQrCodePosterTemplate() { + return iosQrCodePosterTemplate; + } - public void setCclAllowList(String[] cclAllowList) { - this.cclAllowList = cclAllowList; - } + public Integer getMaximumNumberOfKeysPerBundle() { + return maximumNumberOfKeysPerBundle; + } - /** - * getAllowList. - * - * @return AllowList - */ - public AllowList getAllowList() { - return SerializationUtils.deserializeJson(allowList, - typeFactory -> typeFactory - .constructType(AllowList.class)); - } + public Integer getMinimumTrlValueAllowed() { + return minimumTrlValueAllowed; + } - public String getAllowListAsString() { - return allowList; - } + public ObjectStore getObjectStore() { + return objectStore; + } - public void setAllowList(String allowList) { - this.allowList = allowList; - } + public String getOutputFileName() { + return outputFileName; + } - public byte[] getAllowListSignature() { - return Hex.decode(allowListSignature); - } + public String getOutputFileNameV2() { + return outputFileNameV2; + } - public void setAllowListSignature(String allowListSignature) { - this.allowListSignature = allowListSignature; - } + public Paths getPaths() { + return paths; + } - public String getAllowListCertificate() { - return allowListCertificate; - } + public PresenceTracingParameters getPresenceTracingParameters() { + return presenceTracingParameters; + } - public void setAllowListCertificate(String allowListCertificate) { - this.allowListCertificate = allowListCertificate; - } + public Integer getRetentionDays() { + return retentionDays; + } - public Client getClient() { - return client; - } + public Integer getShiftingPolicyThreshold() { + return shiftingPolicyThreshold; + } - public void setClient(Client client) { - this.client = client; - } + public Signature getSignature() { + return signature; + } - public Client getDscClient() { - return dscClient; - } + public int getSrsTypeStatisticsDays() { + return srsTypeStatisticsDays; + } - public void setDscClient(Client dscClient) { - this.dscClient = dscClient; - } + public StatisticsConfig getStatistics() { + return statistics; + } - public String getExportArchiveName() { - return exportArchiveName; - } + public String[] getSupportedCountries() { + return supportedCountries; + } - public void setExportArchiveName(String exportArchiveName) { - this.exportArchiveName = exportArchiveName; - } + public TekExport getTekExport() { + return tekExport; } - public static class AllowList { + public TestData getTestData() { + return testData; + } - private List certificates; + public void setAndroidQrCodePosterTemplate(final QrCodePosterTemplate androidQrCodePosterTemplate) { + this.androidQrCodePosterTemplate = androidQrCodePosterTemplate; + } - private List serviceProviders; + public void setApi(final Api api) { + this.api = api; + } - public List getCertificates() { - return certificates; - } + public void setAppConfigParameters(final AppConfigParameters appConfigParameters) { + this.appConfigParameters = appConfigParameters; + } - @JsonProperty("certificates") - public void setCertificates(List certificates) { - this.certificates = certificates; - } + public void setAppFeatures(final List appFeatures) { + this.appFeatures = appFeatures; + } - public List getServiceProviders() { - return serviceProviders; - } + public void setApplyPoliciesForAllCountries(final Boolean applyPoliciesForAllCountries) { + this.applyPoliciesForAllCountries = applyPoliciesForAllCountries; + } - @JsonProperty("serviceProviders") - public void setServiceProviders(List serviceProviders) { - this.serviceProviders = serviceProviders; - } + public void setAppVersions(final AppVersions appVersions) { + this.appVersions = appVersions; + } - @JsonInclude(Include.NON_NULL) - @JsonIgnoreProperties(ignoreUnknown = true) - public static class ServiceProvider { + public void setCardIdSequence(final String cardIdSequence) { + this.cardIdSequence = cardIdSequence; + } - @JsonProperty("serviceProviderAllowlistEndpoint") - private String serviceProviderAllowlistEndpoint; - @JsonProperty("fingerprint256") - private String fingerprint256; + public void setConnectionPoolSize(final Integer connectionPoolSize) { + this.connectionPoolSize = connectionPoolSize; + } - public String getServiceProviderAllowlistEndpoint() { - return serviceProviderAllowlistEndpoint; - } + public void setDaysToPublish(final Integer daysToPublish) { + this.daysToPublish = daysToPublish; + } - public void setServiceProviderAllowlistEndpoint(String serviceProviderAllowlistEndpoint) { - this.serviceProviderAllowlistEndpoint = serviceProviderAllowlistEndpoint; - } + public void setDccRevocation(final DccRevocation dccRevocation) { + this.dccRevocation = dccRevocation; + } - public String getFingerprint256() { - return fingerprint256; - } + public void setDefaultArchiveName(final String defaultArchiveName) { + this.defaultArchiveName = defaultArchiveName; + } - public void setFingerprint256(String fingerprint256) { - this.fingerprint256 = fingerprint256; - } - } + public void setDigitalGreenCertificate(final DigitalGreenCertificate digitalGreenCertificate) { + this.digitalGreenCertificate = digitalGreenCertificate; + } - @JsonInclude(Include.NON_NULL) - @JsonIgnoreProperties(ignoreUnknown = true) - public static class CertificateAllowList { + public void setEuPackageName(final String euPackageName) { + this.euPackageName = euPackageName; + } - private String serviceProvider; - private String hostname; - private String fingerprint256; + public void setExpiryPolicyMinutes(final Integer expiryPolicyMinutes) { + this.expiryPolicyMinutes = expiryPolicyMinutes; + } - @JsonProperty("serviceProviderAllowlistEndpoint") - private String serviceProviderAllowlistEndpoint; + public void setIncludeIncompleteDays(final Boolean includeIncompleteDays) { + this.includeIncompleteDays = includeIncompleteDays; + } - public String getServiceProvider() { - return serviceProvider; - } + public void setIncludeIncompleteHours(final Boolean includeIncompleteHours) { + this.includeIncompleteHours = includeIncompleteHours; + } - @JsonProperty("serviceProvider") - public void setServiceProvider(String serviceProvider) { - this.serviceProvider = serviceProvider; - } + public void setInfectionThreshold(final int infectionThreshold) { + this.infectionThreshold = infectionThreshold; + } - public String getHostname() { - return hostname; - } + public void setIosQrCodePosterTemplate(final QrCodePosterTemplate iosQrCodePosterTemplate) { + this.iosQrCodePosterTemplate = iosQrCodePosterTemplate; + } - @JsonProperty("hostname") - public void setHostname(String hostname) { - this.hostname = hostname; - } + public void setMaximumNumberOfKeysPerBundle(final Integer maximumNumberOfKeysPerBundle) { + this.maximumNumberOfKeysPerBundle = maximumNumberOfKeysPerBundle; + } - public String getFingerprint256() { - return fingerprint256; - } + public void setMinimumTrlValueAllowed(final Integer minimumTrlValueAllowed) { + this.minimumTrlValueAllowed = minimumTrlValueAllowed; + } - @JsonProperty("fingerprint256") - public void setFingerprint256(String fingerprint256) { - this.fingerprint256 = fingerprint256; - } + public void setObjectStore( + final ObjectStore objectStore) { + this.objectStore = objectStore; + } - public String getServiceProviderAllowlistEndpoint() { - return serviceProviderAllowlistEndpoint; - } + public void setOutputFileName(final String outputFileName) { + this.outputFileName = outputFileName; + } - public void setServiceProviderAllowlistEndpoint(String serviceProviderAllowlistEndpoint) { - this.serviceProviderAllowlistEndpoint = serviceProviderAllowlistEndpoint; - } - } + public void setOutputFileNameV2(final String outputFileNameV2) { + this.outputFileNameV2 = outputFileNameV2; } - public static class DccRevocation { + public void setPaths(final Paths paths) { + this.paths = paths; + } - private Client client; - private String certificate; - private String dccListPath; - private String dccRevocationDirectory; + public void setPresenceTracingParameters( + final PresenceTracingParameters presenceTracingParameters) { + this.presenceTracingParameters = presenceTracingParameters; + } - public Client getClient() { - return client; - } + public void setRetentionDays(final Integer retentionDays) { + this.retentionDays = retentionDays; + } - public void setClient(Client client) { - this.client = client; - } + public void setShiftingPolicyThreshold(final Integer shiftingPolicyThreshold) { + this.shiftingPolicyThreshold = shiftingPolicyThreshold; + } - public String getCertificate() { - return certificate; - } + public void setSignature(final Signature signature) { + this.signature = signature; + } - public void setCertificate(String certificate) { - this.certificate = certificate; - } + public void setSrsTypeStatisticsDays(final int srsTypeStatisticsDays) { + this.srsTypeStatisticsDays = srsTypeStatisticsDays; + } - public String getDccListPath() { - return dccListPath; - } + public void setStatistics(final StatisticsConfig statistics) { + this.statistics = statistics; + } - public void setDccListPath(String dccListPath) { - this.dccListPath = dccListPath; - } + public void setSupportedCountries(final String[] supportedCountries) { + this.supportedCountries = supportedCountries; + } - public String getDccRevocationDirectory() { - return dccRevocationDirectory; - } + public void setTekExport(final TekExport tekExport) { + this.tekExport = tekExport; + } - public void setDccRevocationDirectory(String dccRevocationDirectory) { - this.dccRevocationDirectory = dccRevocationDirectory; - } + public void setTestData(final TestData testData) { + this.testData = testData; } } diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/StatisticsToProtobufMapping.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/StatisticsToProtobufMapping.java index 1f60434150..5100f2d4b7 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/StatisticsToProtobufMapping.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/StatisticsToProtobufMapping.java @@ -128,9 +128,12 @@ public Statistics constructProtobufStatistics() { } private Iterable buildAllLinkCards() { - return Collections.singleton( + return List.of( LinkCard.newBuilder().setHeader(CardHeader.newBuilder().setCardId(Cards.PANDEMIC_RADAR_CARD.ordinal()).build()) - .setUrl(distributionServiceConfig.getStatistics().getPandemicRadarUrl()).build()); + .setUrl(distributionServiceConfig.getStatistics().getPandemicRadarUrl()).build(), + LinkCard.newBuilder() + .setHeader(CardHeader.newBuilder().setCardId(Cards.PANDEMIC_RADAR_BMG_CARD.ordinal()).build()) + .setUrl(distributionServiceConfig.getStatistics().getPandemicRadarBmgUrl()).build()); } private List getAllCardIdSequence() { diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/Cards.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/Cards.java index fc57dca2aa..f2c047fe84 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/Cards.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/Cards.java @@ -21,67 +21,98 @@ public enum Cards { /** * Empty card. */ - EMPTY_CARD(new EmptyCardFactory(), "EMPTY CARD"), + EMPTY_CARD("EMPTY CARD"), /** * Infections Card. */ - INFECTIONS_CARD(new InfectionsCardFactory(), "Infections Card"), + INFECTIONS_CARD("Infections Card"), /** * Incidence Card. */ - INCIDENCE_CARD(new IncidenceCardFactory(), "Incidence Card"), + INCIDENCE_CARD("Incidence Card"), /** * Key Submission Card. */ - KEY_SUBMISSION_CARD(new KeySubmissionCardFactory(), "Key Submission Card"), + KEY_SUBMISSION_CARD("Key Submission Card"), /** * Reproduction Number Card. */ - REPRODUCTION_NUMBER_CARD(new ReproductionNumberCardFactory(), "Reproduction Number Card"), + REPRODUCTION_NUMBER_CARD("Reproduction Number Card"), /** * First Vaccination Card. */ - FIRST_VACCINATION_CARD(new FirstVaccinationCardFactory(), "First Vaccination Card"), + FIRST_VACCINATION_CARD("First Vaccination Card"), /** * Fully Vaccincated Card. */ - FULLY_VACCINATED_CARD(new FullyVaccinatedCardFactory(), "Fully Vaccincated Card"), + FULLY_VACCINATED_CARD("Fully Vaccincated Card"), /** * Vaccination Doses Card. */ - VACCINATION_DOSES_CARD(new VaccinationDosesCardFactory(), "Vaccination Doses Card"), + VACCINATION_DOSES_CARD("Vaccination Doses Card"), /** * Hospitalization Incidence Card. */ - HOSPITALIZATION_INCIDENCE_CARD(new HospitalizationIncidenceCardFactory(), "Hospitalization Incidence Card"), + HOSPITALIZATION_INCIDENCE_CARD("Hospitalization Incidence Card"), /** * Intensive Care Card. */ - INTENSIVE_CARE_CARD(new IntensiveCareCardFactory(), "Intensive Care Card"), + INTENSIVE_CARE_CARD("Intensive Care Card"), /** * Joined Incidence Card. */ - JOINED_INCIDENCE_CARD(new JoinedIncidenceCardFactory(), "Joined incidence Card"), + JOINED_INCIDENCE_CARD("Joined incidence Card"), /** * Third Dose Card. */ - BOOSTER_VACCINATED_CARD(new BoosterVaccinatedCardFactory(), "Booster Vaccinated Card"), - - PANDEMIC_RADAR_CARD(new LinkCardFactory(), "Link Card"); + BOOSTER_VACCINATED_CARD("Booster Vaccinated Card"), + /** + * Outdated pandemic radar URL card. + */ + PANDEMIC_RADAR_CARD("Link Card"), + /** + * New pandemic radar (BMG) URL card. + */ + PANDEMIC_RADAR_BMG_CARD("Pandemic Radar Card (BMG)"), + ; /** * Get card factory by ID. * - * @param id {@link #ordinal()} + * @param card {@link #ordinal()} * @param config The distribution configuration used to get the infection threshold parameter. * @return {@link #getFactory()} */ - public static HeaderCardFactory getFactoryFor(final int id, final DistributionServiceConfig config) { - try { - values()[id].getFactory().setConfig(config); - return values()[id].getFactory(); - } catch (final ArrayIndexOutOfBoundsException e) { - return EMPTY_CARD.getFactory(); + public static HeaderCardFactory getFactoryFor(final Cards card, final DistributionServiceConfig config) { + switch (card) { + case INFECTIONS_CARD: + return new InfectionsCardFactory(config); + case INCIDENCE_CARD: + return new IncidenceCardFactory(config); + case KEY_SUBMISSION_CARD: + return new KeySubmissionCardFactory(config); + case REPRODUCTION_NUMBER_CARD: + return new ReproductionNumberCardFactory(config); + case FIRST_VACCINATION_CARD: + return new FirstVaccinationCardFactory(config); + case FULLY_VACCINATED_CARD: + return new FullyVaccinatedCardFactory(config); + case VACCINATION_DOSES_CARD: + return new VaccinationDosesCardFactory(config); + case HOSPITALIZATION_INCIDENCE_CARD: + return new HospitalizationIncidenceCardFactory(config); + case INTENSIVE_CARE_CARD: + return new IntensiveCareCardFactory(config); + case JOINED_INCIDENCE_CARD: + return new JoinedIncidenceCardFactory(config); + case BOOSTER_VACCINATED_CARD: + return new BoosterVaccinatedCardFactory(config); + case PANDEMIC_RADAR_CARD: + return new LinkCardFactory(config, PANDEMIC_RADAR_CARD); + case PANDEMIC_RADAR_BMG_CARD: + return new LinkCardFactory(config, PANDEMIC_RADAR_BMG_CARD); + default: + return new EmptyCardFactory(config); } } @@ -99,19 +130,12 @@ public static String getNameFor(final int id) { } } - final HeaderCardFactory factory; - final String name; - Cards(final HeaderCardFactory factory, final String name) { - this.factory = factory; + Cards(final String name) { this.name = name; } - HeaderCardFactory getFactory() { - return factory; - } - String getName() { return name; } diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/KeyFigureCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/KeyFigureCardFactory.java index 6cf70ed5fd..184b2163b1 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/KeyFigureCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/KeyFigureCardFactory.java @@ -1,20 +1,38 @@ package app.coronawarn.server.services.distribution.statistics.keyfigurecard; import static app.coronawarn.server.services.distribution.statistics.keyfigurecard.Cards.getFactoryFor; +import static app.coronawarn.server.services.distribution.statistics.keyfigurecard.Cards.values; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; +import app.coronawarn.server.services.distribution.statistics.keyfigurecard.factory.EmptyCardFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class KeyFigureCardFactory { + private static final Logger logger = LoggerFactory.getLogger(KeyFigureCardFactory.class); + @Autowired DistributionServiceConfig distributionServiceConfig; - public KeyFigureCard createKeyFigureCard(StatisticsJsonStringObject stats, int cardId) { - return getFactoryFor(cardId, this.distributionServiceConfig).makeKeyFigureCard(stats); + /** + * Creates a new statistics card, based upon the given ordinal. + * + * @param stats data for the card. + * @param cardId ordinal number of {@link Cards}. + * @return a new {@link KeyFigureCard}. + */ + public KeyFigureCard createKeyFigureCard(final StatisticsJsonStringObject stats, final int cardId) { + try { + return getFactoryFor(values()[cardId], distributionServiceConfig).makeKeyFigureCard(stats); + } catch (final IndexOutOfBoundsException e) { + logger.error(Cards.class + " doesn't contain value for: " + cardId, e); + return new EmptyCardFactory(distributionServiceConfig).makeKeyFigureCard(stats); + } } } diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/BoosterVaccinatedCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/BoosterVaccinatedCardFactory.java index 08f2e21eb8..f87203236f 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/BoosterVaccinatedCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/BoosterVaccinatedCardFactory.java @@ -8,12 +8,17 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.TrendSemantic; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import java.util.List; import java.util.Optional; public class BoosterVaccinatedCardFactory extends HeaderCardFactory { + public BoosterVaccinatedCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return BOOSTER_VACCINATED_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/EmptyCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/EmptyCardFactory.java index 35c5bc77ae..531e0ba6da 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/EmptyCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/EmptyCardFactory.java @@ -2,8 +2,14 @@ import static app.coronawarn.server.services.distribution.statistics.keyfigurecard.Cards.EMPTY_CARD; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; + public class EmptyCardFactory extends HeaderCardFactory { + public EmptyCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return EMPTY_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FirstVaccinationCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FirstVaccinationCardFactory.java index a7955345f0..80154731e1 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FirstVaccinationCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FirstVaccinationCardFactory.java @@ -8,12 +8,17 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.TrendSemantic; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import java.util.List; import java.util.Optional; public class FirstVaccinationCardFactory extends HeaderCardFactory { + public FirstVaccinationCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return FIRST_VACCINATION_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FullyVaccinatedCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FullyVaccinatedCardFactory.java index b4e3abbbb2..59b37871c8 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FullyVaccinatedCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/FullyVaccinatedCardFactory.java @@ -8,12 +8,17 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.TrendSemantic; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import java.util.List; import java.util.Optional; public class FullyVaccinatedCardFactory extends HeaderCardFactory { + public FullyVaccinatedCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return FULLY_VACCINATED_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HeaderCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HeaderCardFactory.java index 1635d04755..e499e3b558 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HeaderCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HeaderCardFactory.java @@ -20,6 +20,10 @@ public abstract class HeaderCardFactory { protected DistributionServiceConfig config; + public HeaderCardFactory(final DistributionServiceConfig config) { + this.config = config; + } + /** * Create KeyFigureCard object. Calls the children method `buildKeyFigureCard` for card specific properties. This * method adds the generic CardHeader that all KeyFigureCards must have. diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HospitalizationIncidenceCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HospitalizationIncidenceCardFactory.java index 5cd70bdce1..7de8ca91da 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HospitalizationIncidenceCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/HospitalizationIncidenceCardFactory.java @@ -6,6 +6,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.Rank; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; @@ -13,6 +14,10 @@ public class HospitalizationIncidenceCardFactory extends HeaderCardFactory { + public HospitalizationIncidenceCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return HOSPITALIZATION_INCIDENCE_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IncidenceCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IncidenceCardFactory.java index 50ff578fa0..38f9514eee 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IncidenceCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IncidenceCardFactory.java @@ -6,6 +6,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.Rank; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; @@ -13,6 +14,10 @@ public class IncidenceCardFactory extends HeaderCardFactory { + public IncidenceCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return INCIDENCE_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/InfectionsCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/InfectionsCardFactory.java index 17efc322a6..80a42b916a 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/InfectionsCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/InfectionsCardFactory.java @@ -10,6 +10,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; @@ -19,6 +20,10 @@ public class InfectionsCardFactory extends HeaderCardFactory { + public InfectionsCardFactory(final DistributionServiceConfig config) { + super(config); + } + private static final Logger logger = LoggerFactory.getLogger(InfectionsCardFactory.class); @Override diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IntensiveCareCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IntensiveCareCardFactory.java index 094de5ad3a..0ed3c8b256 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IntensiveCareCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/IntensiveCareCardFactory.java @@ -6,6 +6,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.Rank; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; @@ -13,6 +14,10 @@ public class IntensiveCareCardFactory extends HeaderCardFactory { + public IntensiveCareCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return INTENSIVE_CARE_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/JoinedIncidenceCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/JoinedIncidenceCardFactory.java index 5356cc8d22..8afdaeda20 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/JoinedIncidenceCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/JoinedIncidenceCardFactory.java @@ -7,6 +7,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.Rank; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.time.LocalDate; @@ -15,6 +16,10 @@ public class JoinedIncidenceCardFactory extends HeaderCardFactory { + public JoinedIncidenceCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return JOINED_INCIDENCE_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/KeySubmissionCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/KeySubmissionCardFactory.java index e534bd00a0..f7781e4fa9 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/KeySubmissionCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/KeySubmissionCardFactory.java @@ -8,14 +8,18 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.TrendSemantic; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; import java.util.Optional; - public class KeySubmissionCardFactory extends HeaderCardFactory { + public KeySubmissionCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return KEY_SUBMISSION_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/LinkCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/LinkCardFactory.java index d44b25e9a7..d691fe0866 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/LinkCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/LinkCardFactory.java @@ -1,11 +1,19 @@ package app.coronawarn.server.services.distribution.statistics.keyfigurecard.factory; -import static app.coronawarn.server.services.distribution.statistics.keyfigurecard.Cards.PANDEMIC_RADAR_CARD; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; +import app.coronawarn.server.services.distribution.statistics.keyfigurecard.Cards; public class LinkCardFactory extends HeaderCardFactory { + public LinkCardFactory(final DistributionServiceConfig config, final Cards card) { + super(config); + this.card = card; + } + + private final Cards card; + @Override public int getCardId() { - return PANDEMIC_RADAR_CARD.ordinal(); + return card.ordinal(); } } diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/ReproductionNumberCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/ReproductionNumberCardFactory.java index 6989ad4bea..cbbce800a5 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/ReproductionNumberCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/ReproductionNumberCardFactory.java @@ -6,6 +6,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.Rank; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; @@ -13,6 +14,10 @@ public class ReproductionNumberCardFactory extends HeaderCardFactory { + public ReproductionNumberCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return REPRODUCTION_NUMBER_CARD.ordinal(); diff --git a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/VaccinationDosesCardFactory.java b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/VaccinationDosesCardFactory.java index bf39072404..1778996a1c 100644 --- a/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/VaccinationDosesCardFactory.java +++ b/services/distribution/src/main/java/app/coronawarn/server/services/distribution/statistics/keyfigurecard/factory/VaccinationDosesCardFactory.java @@ -8,6 +8,7 @@ import app.coronawarn.server.common.protocols.internal.stats.KeyFigure.TrendSemantic; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard; import app.coronawarn.server.common.protocols.internal.stats.KeyFigureCard.Builder; +import app.coronawarn.server.services.distribution.config.DistributionServiceConfig; import app.coronawarn.server.services.distribution.statistics.StatisticsJsonStringObject; import app.coronawarn.server.services.distribution.statistics.keyfigurecard.ValueTrendCalculator; import java.util.List; @@ -15,6 +16,10 @@ public class VaccinationDosesCardFactory extends HeaderCardFactory { + public VaccinationDosesCardFactory(final DistributionServiceConfig config) { + super(config); + } + @Override protected int getCardId() { return VACCINATION_DOSES_CARD.ordinal(); diff --git a/services/distribution/src/main/resources/application.yaml b/services/distribution/src/main/resources/application.yaml index 9031bb7037..f3053eaed2 100644 --- a/services/distribution/src/main/resources/application.yaml +++ b/services/distribution/src/main/resources/application.yaml @@ -40,7 +40,7 @@ services: eu-package-name: EUR # Indicates whether the shifting and expiry policies are applied to all supported countries during distribution. apply-policies-for-all-countries: false - card-id-sequence: ${STATS_CARD_ID_SEQUENCE:[12,999,10,2,8,9,1,3,4,5,6,11,7]} + card-id-sequence: ${STATS_CARD_ID_SEQUENCE:[13,12,999,10,2,8,9,1,3,4,5,6,11,7]} # Local paths, that are used during the export creation. connection-pool-size: 200 default-archive-name: export.bin @@ -120,6 +120,7 @@ services: endpoint: ${STATISTICS_FILE_S3_ENDPOINT:} bucket: ${STATISTICS_FILE_S3_BUCKET:obs-cwa-public-dev} pandemic-radar-url: ${STATISTICS_PANDEMIC_RADAR_URL:https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Situationsberichte/COVID-19-Trends/COVID-19-Trends.html?__blob=publicationFile#/home} + pandemic-radar-bmg-url: ${STATISTICS_PANDEMIC_RADAR_BMG_URL:https://corona-pandemieradar.de/} app-features: - label: unencrypted-checkins-enabled diff --git a/services/distribution/src/test/resources/application.yaml b/services/distribution/src/test/resources/application.yaml index 32de58b9a7..9c7ebb2779 100644 --- a/services/distribution/src/test/resources/application.yaml +++ b/services/distribution/src/test/resources/application.yaml @@ -76,7 +76,8 @@ services: secret-key: secretKey endpoint: https://localhost bucket: ${STATS_S3_BUCKET:obs-cwa-public-dev} - pandemic-radar-url: ${STATISTICS_PANDEMIC_RADAR_URL:https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Situationsberichte/COVID-19-Trends/COVID-19-Trends.html?__blob=publicationFile#/home} + pandemic-radar-url: https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Situationsberichte/COVID-19-Trends/COVID-19-Trends.html?__blob=publicationFile#/home + pandemic-radar-bmg-url: https://corona-pandemieradar.de/ app-features: - label: unencrypted-checkins-enabled