Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
expect up to 3 PPAKeySubmissionMetadata (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
hilmarf authored Feb 7, 2023
1 parent 18facaf commit 86b8294
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ message PPADataIOS {
repeated PPANewExposureWindow newExposureWindows = 3;
// 0..2 entries expected
repeated PPATestResultMetadata testResultMetadataSet = 4;
// 0..2 entries expected
// 0..3 entries expected
repeated PPAKeySubmissionMetadata keySubmissionMetadataSet = 5;

PPAClientMetadataIOS clientMetadata = 6;
Expand All @@ -33,7 +33,7 @@ message PPADataAndroid {
repeated PPANewExposureWindow newExposureWindows = 3;
// 0..2 entries expected
repeated PPATestResultMetadata testResultMetadataSet = 4;
// 0..2 entries expected
// 0..3 entries expected
repeated PPAKeySubmissionMetadata keySubmissionMetadataSet = 5;

PPAClientMetadataAndroid clientMetadata = 6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public class PpaDataRequestAndroidValidator implements PpaDataRequestValidator<P
public void validate(PPADataAndroid payload, Integer maxExposureWindowsToRejectSubmission) {
validateCardinalities(payload.getExposureRiskMetadataSetList(), 0, 1, "Exposure Risk Metadata");
validateCardinalities(payload.getTestResultMetadataSetList(), 0, 2, "Test Result Metadata");
validateCardinalities(payload.getKeySubmissionMetadataSetList(), 0, 2,
"Key Submission Metadata");
validateCardinalities(payload.getKeySubmissionMetadataSetList(), 0, 3, "Key Submission Metadata");
validateCardinalities(payload.getNewExposureWindowsList(), 0,
maxExposureWindowsToRejectSubmission, "New Exposure Windows");
validateCardinalitiesOfScanInstanceData(payload.getNewExposureWindowsList());
Expand Down

0 comments on commit 86b8294

Please sign in to comment.